From c37797b4897535810d8f2227a9a30b2fcb23c260 Mon Sep 17 00:00:00 2001 From: Cyteen Date: Mon, 25 Mar 2019 10:45:38 +0000 Subject: [PATCH] Commit before pull and merge. --- .020_pycharm-install.sh.swp | Bin 0 -> 12288 bytes 001_apt-sources.sh | 5 +- 001_udev-rules.sh | 26 ++++ 010_apt-get.sh | 1 + 010_hddtemp.sh | 4 + 020_arduino.sh | 139 +++++++++++++++++++- 020_etcher.io.sh | 7 + 020_freecad.sh | 32 ++++- 020_ghack_userjs.sh | 3 + 020_nvidia_cuda.sh | 41 ++++++ 020_photogrametry.sh | 22 ++++ 020_platformio-core.sh | 247 ++++++++++++++++++++++++++++++++++++ 020_pycharm-install.sh | 66 ++++++---- 020_python-jf.sh | 9 ++ 020_riot.sh | 10 ++ 020_tmux.sh | 18 ++- 020_unetbootin.sh | 8 +- 020_vim.sh | 24 +++- 020_waterfox.sh | 10 +- firefox-speedup.example | 42 ++++++ thinkpad-dock.sh | 2 +- 21 files changed, 664 insertions(+), 52 deletions(-) create mode 100644 .020_pycharm-install.sh.swp create mode 100644 010_hddtemp.sh create mode 100644 020_etcher.io.sh create mode 100644 020_ghack_userjs.sh create mode 100644 020_nvidia_cuda.sh create mode 100644 020_photogrametry.sh create mode 100644 020_platformio-core.sh create mode 100644 020_python-jf.sh create mode 100644 020_riot.sh create mode 100644 firefox-speedup.example diff --git a/.020_pycharm-install.sh.swp b/.020_pycharm-install.sh.swp new file mode 100644 index 0000000000000000000000000000000000000000..0bd2cabd73bdaba4d6029b4abbd7240a22b02082 GIT binary patch literal 12288 zcmeI2&u`pB6vtnYssg3_6!%9`QjlUh2?a&jZXnuhLWGi*q(nj$3bXdC*In<}8qX%# z5QI3uox*{?0PzR(${7#`#DTwn1EO3I;)am;+VO68yG@{iOQc!p8^`vWH}8Gk%v(j7 z#?1EGI?uZ^gwK;i8xv36SpE4dou42IWK(owlfOCfBib^S>O_;`rMD}zXF93Z5SerX zZ)R?0C++zyp*v2bG9%*H&07EL$68ndmcRoN=$fW8e}P__n=Q8bKxH04t-5iHq-Dd%O1f(&qZkc71be?drz+6W*BF&i%}s*&WddUb*ZBvO&^s zC49+mNxxm5KV+xJj?>JH7AmW%1UKcI{08S1TkLw}lm6L7oLS_##i?07WFsX@tuOH+ z4|^T9oSN#pImUvheszVmrOu*6v7acTlb9oAWT=I~vjql)W+VgdW>Ob#bW`|}n~CNy zGA^wqNf=9BN>i?@FjA7Q^-K%i0=X;WB<)BAtF_W)?g&^Bd}bmQPV-)5S{!4T)95+* z6;TBFk6o!nC`U#P95=dQD78yl-84ZY(1hO%g_E@NZ zS7MR1sq~_8;M6yXMidJy_fZ7ja7QBaU^>rJCqWl^;uvWp8nGOH22MCYs?0Q}-8klM zT6j;ps7;XUDVJ(V0Jki%EXobxCZAp?5%=(o4ZT3<_$dHKK&UP$#%u!sM{)5`{M?5@t5QiF`5RbR)uBZ^6gZas z0527GX;~D^K}G)99B~AyAV@csW!5%HzFUm$y+b3gN75^s47x`#fGAe%WKAA1${C>}p=aqO|q>5Thu zG0Y7Q*r^rXXmT%?<#-t0Lmv6E-5rKPCnuZog(nUyE3VGk@uZR<)EN37;7(~X0 zhiC(lp?kW0bv(X7&5riRc#EcC$Nwsz!R#YL84Y|m_w4^nK6n1#>NAFFZf17gopmqM Q /etc/udev/rules.d/99-ch341a-prog.rules << 'EOF' +SUBSYSTEM!="usb", GOTO="ch431a-prog_rules_end" + +ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666", GROUP="plugdev" + +LABEL="ch431a-prog_rules_end" +EOF + +echo 'blacklist usbtest' >> /etc/modprobe.d/blacklist.conf cat > /etc/udev/rules.d/99-xf2-logic.rules << 'EOF' SUBSYSTEM!="usb", GOTO="fx2-probe--programming_rules_end" @@ -55,6 +64,22 @@ ATTRS{idVendor}=="10C4", ATTRS{idProduct}=="EA61", MODE="0666", GROUP="plugdev" LABEL="cp210x-programming_rules_end" EOF +cat > /etc/udev/rules.d/99-ftdi.rules << 'EOF' +SUBSYSTEM=="usb", GOTO="ftdi_rules_end" + +ATTR{product}=="ftdi", ATTR{idProduct}=="0403", ATTRS{idVendor}=="6001", MODE="0666", GROUP="plugdev" + +LABEL="ftdi_rules_end" +EOF + +cat > /etc/udev/rules.d/99-USBasp.rules << 'EOF' +SUBSYSTEM=="usb", GOTO="USBasp_rules_end" + +ATTR{product}=="USBasp", ATTR{idProduct}=="05dc", ATTRS{idVendor}=="16c0", MODE="0666", GROUP="plugdev" + +LABEL="USBasp_rules_end" +EOF + cat > /etc/udev/rules.d/81-thinkpad-dock.rules << 'EOF' KERNEL=="dock.0", ACTION=="change", RUN+="/usr/local/sbin/thinkpad-dock.sh" EOF @@ -66,3 +91,4 @@ ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee7", MODE="0666", GROUP="plugdev", S LABEL="android_rules_end" EOF + diff --git a/010_apt-get.sh b/010_apt-get.sh index 02f7e34..8664201 100644 --- a/010_apt-get.sh +++ b/010_apt-get.sh @@ -25,6 +25,7 @@ apt-get -y install sysstat apt-get -y install mpv apt-get -y install youtube-dl apt-get -y install cmus +apt-get -y install scdl apt-get -y install checkinstall apt-get -y install ntp ntpdate apt-get -y install nmap diff --git a/010_hddtemp.sh b/010_hddtemp.sh new file mode 100644 index 0000000..ed480f2 --- /dev/null +++ b/010_hddtemp.sh @@ -0,0 +1,4 @@ +apt-get install -y hddtemp + +# RUN_DAEMON="false" +sed -i 's,^\(RUN_DAEMON=\).*,\1'\"true\"',' /etc/default/hddtemp diff --git a/020_arduino.sh b/020_arduino.sh index 8bbbc21..fd7bd1a 100644 --- a/020_arduino.sh +++ b/020_arduino.sh @@ -1,18 +1,143 @@ +ARDUINO_VERSION=1.8.5 +#ARDUINO_VERSION=nightly +#ARDUINO_HOME=~/ +ARDUINO_HOME=/opt +ARDUINO_DIR=${ARDUINO_HOME}/arduino-${ARDUINO_VERSION}/ +ARDUINO_TOOLS_DIR=${ARDUINO_TOOLS_DIR} +ADD_URLS= -cd /var/tmp -#ARDUINO_VERSION=1.8.3 -ARDUINO_VERSION=nightly +mkdir "${ARDUINO_TOOLS_DIR}" +sudo apt-get install gcc-arm-none-eabi openocd bsdtar + +cd /var/tmp || exit + +#Install arduino IDE wget -c https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz && \ - cd /opt && \ + cd ${ARDUINO_HOME} && \ tar xf /var/tmp/arduino-${ARDUINO_VERSION}-linux64.tar.xz -usermod -a -G dialout $USER && \ +usermod -a -G dialout "${USER}" && \ apt-get install git python-serial -mkdir -p ~/Arduino/hardware/espressif && \ - cd ~/Arduino/hardware/espressif && \ +#https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json +#http://arduino.esp8266.com/stable/package_esp8266com_index.json +#https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json +#https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json +#https://micooke.github.io/package_nRF5_smartwatches_index.json + +# https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls +# Install ESP32 core +ADD_URLS="${ADD_URLS},https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json" +${ARDUINO_DIR}/arduino \ + --pref boardsmanager.additional.urls=${ADD_URLS} \ + --save-prefs +# arduino [--install-boards package name:platform architecture[:version]] +${ARDUINO_DIR}/arduino --install-boards esp32:esp32 + +mkdir -p ${ARDUINO_DIR}/hardware/espressif && \ + cd ${ARDUINO_DIR}/hardware/espressif && \ git clone https://github.com/espressif/arduino-esp32.git esp32 && \ + cd esp32 && \ + git submodule update --init --recursive && \ cd esp32/tools/ && \ python get.py +# Install ESP8266 +cd /var/tmp || exit +ADD_URLS="${ADD_URLS},http://arduino.esp8266.com/stable/package_esp8266com_index.json" +echo ${ADD_URLS} +${ARDUINO_DIR}/arduino \ + --pref boardsmanager.additional.urls=${ADD_URLS} \ + --save-prefs +# arduino [--install-boards package name:platform architecture[:version]] +${ARDUINO_DIR}/arduino --install-boards esp8266:esp8266 + + + +# Install stm32 bluepill +# http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/arduino-compatibility.html +# --pref boardsmanager.additional.urls="http://dan.drown.org/stm32duino/package_STM32duino_index.json" \ +#${ARDUINO_DIR}/arduino --install-boards stm32duino:STM32F1 +ADD_URLS="${ADD_URLS},https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json" +echo ${ADD_URLS} +${ARDUINO_DIR}/arduino \ + --pref boardsmanager.additional.urls=${ADD_URLS} \ + --save-prefs + +## arduino [--install-boards package name:platform architecture[:version]] +${ARDUINO_DIR}/arduino --install-boards STM32:stm32 + + +# Install NRF5x sandeepmistry https://github.com/sandeepmistry/arduino-nRF5 +#name "BBC micro:bit" +#name "Bluz DK" +#name "Generic nRF51822" +#name "Generic nRF52823" +#name "OSHChip" +#name "ng-beacon" +#name "nRF51 Dongle" +#name "nRF51822 Development Kit" +#name "nRF52 DK" +#name "RedBear BLE Nano 2" +#name "RedBear Blend 2" +#name "RedBearLab BLE Nano" +#name "RedBearLab nRF51822" +#name "Waveshare BLE400" + +ADD_URLS="${ADD_URLS},https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json" +echo ${ADD_URLS} +${ARDUINO_DIR}/arduino \ + --pref boardsmanager.additional.urls=${ADD_URLS} \ + --save-prefs + +# arduino [--install-boards package name:platform architecture[:version]] +${ARDUINO_DIR}/arduino --install-boards sandeepmistry:nRF5 + +NRF_HOME=${ARDUINO_TOOLS_DIR}/nRF5FlashSoftDevice/tool/ +mkdir -p "${NRF_HOME}" && wget -c --directory-prefix "${NRF_HOME}" https://github.com/sandeepmistry/arduino-nRF5/releases/download/tools/nRF5FlashSoftDevice.jar + + +# nRF5 watches https://github.com/micooke/arduino-nRF5-smartwatches +# Smartwatch variants for sandeepmistry's Nordic Semiconductor nRF5 core +#name "IDO003" +#name "ID100HR" +#name "ID107HR" +#name "ID107HR Plus" +ADD_URLS="${ADD_URLS},https://micooke.github.io/package_nRF5_smartwatches_index.json" +${ARDUINO_DIR}/arduino \ + --pref boardsmanager.additional.urls=${ADD_URLS} \ + --save-prefs + +## arduino [--install-boards package name:platform architecture[:version]] +${ARDUINO_DIR}/arduino --install-boards micooke:nRF5 +## Install Readbear NRF5x +#cd /var/tmp || exit +#${ARDUINO_DIR}/arduino \ +# --pref="boardsmanager.additional.urls=https://redbearlab.github.io/arduino/package_redbearlab_index.json"\ +# --save-prefs +# +#wget -c https://raw.githubusercontent.com/RedBearLab/nRF51822-Arduino/S130/98-daplink.rules +#cp 98-daplink.rules /etc/udev/rules.d/ +# +#sudo udevadm control --reload-rules +# +## Fix the upload problem on Linux 64bit system +# +#sudo apt-get install lsb-core +# +#sudo apt-get install libudev1:i386 +# +#sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0 + +# Guru meditation decode - get a more meaningful explanation of the stack traces you get on ESP8266/ESP32. +wget -qO - https://github.com/me-no-dev/EspExceptionDecoder/releases/download/1.1.0/EspExceptionDecoder-1.1.0.zip | bsdtar -C "${ARDUINO_TOOLS_DIR}" -xvf- + + +# Other libraries direct from github +git clone https://github.com/adafruit/Touch-Screen-Library ~/Arduino/libraries/TouchScreen + +# https://learn.adafruit.com/ahrs-for-adafruits-9-dof-10-dof-breakout/sensor-fusion-algorithmsahrs +git clone https://github.com/PaulStoffregen/MahonyAHRS ~/Arduino/libraries/MahonyAHRS +git clone https://github.com/PaulStoffregen/MadgwickAHRS ~/Arduino/libraries/MadgwickAHRS + diff --git a/020_etcher.io.sh b/020_etcher.io.sh new file mode 100644 index 0000000..6f469f5 --- /dev/null +++ b/020_etcher.io.sh @@ -0,0 +1,7 @@ +echo "deb https://deb.etcher.io stable etcher" | sudo tee /etc/apt/sources.list-available/etcher.list +ln -s /etc/apt/sources.list-available/etcher.list /etc/apt/sources.list.d/etcher.list + +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61 + +sudo apt-get update +sudo apt-get install etcher-electron diff --git a/020_freecad.sh b/020_freecad.sh index e1f3fcb..d371a0f 100644 --- a/020_freecad.sh +++ b/020_freecad.sh @@ -2,15 +2,15 @@ # debian is still on 0.16 but 0.17 is needed for current workbenches # If building, use cmake gui for configuring the build. -sudo apt-get install -y cmake-qt-gui +sudo apt-get install -y cmake-qt-gui python-numpy python3-numpy z88 # the ppa has calculix-ccx eigen3 freecad-daily (0.18~beta1) opencascade # ppa:freecad-maintainers/freecad-daily # sudo add-apt-repository ppa:freecad-maintainers/freecad-daily # sudo apt-get update -# YOUR_UBUNTU_VERSION_HERE=bionic # 18.04 buster/sid -YOUR_UBUNTU_VERSION_HERE=artful # 17.10 stretch/sid + YOUR_UBUNTU_VERSION_HERE=bionic # 18.04 buster/sid +# YOUR_UBUNTU_VERSION_HERE=artful # 17.10 stretch/sid # YOUR_UBUNTU_VERSION_HERE=xenial # 16.04 stretch/sid # YOUR_UBUNTU_VERSION_HERE=trusty # 14.04 jessie/sid @@ -18,7 +18,7 @@ sudo bash -c "cat > /etc/apt/sources.list-available/freecad-daily.list" < /etc/apt/sources.list-available/freecad-stable.list" < /etc/apt/sources.list-available/elmer.list" < /etc/apt/sources.list-available/elmer.list" < /etc/apt/sources.list-available/cuda.list +#echo 'deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64 /' >> /etc/apt/sources.list-available/cuda.list +#ln -s /etc/apt/sources.list-available/cuda.list /etc/apt/sources.list.d/cuda.list +# +#sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub +#sudo apt-get update +#sudo apt-get install cuda + +# debian +apt-get install \ + nvidia-cuda-toolkit \ + nvidia-cuda-mps \ + nvidia-visual-profiler \ + nvidia-cuda-dev + +# libnvidia-legacy-304xx-cuda1 - NVIDIA CUDA Driver Library (304xx legacy version) +# libnvidia-legacy-304xx-nvcuvid1 - NVIDIA CUDA Video Decoder runtime library (304xx legacy version) +# libnvidia-legacy-340xx-cuda1 - NVIDIA CUDA Driver Library (340xx legacy version) +# libnvidia-legacy-340xx-nvcuvid1 - NVIDIA CUDA Video Decoder runtime library (340xx legacy version) + + diff --git a/020_photogrametry.sh b/020_photogrametry.sh new file mode 100644 index 0000000..21447bd --- /dev/null +++ b/020_photogrametry.sh @@ -0,0 +1,22 @@ +## VisualSFM - A Visual Structure from Motion System +# http://ccwu.me/vsfm/ + +VSFM_HOME=/var/tmp/vsfm +mkdir ${VSFM_HOME} +cd ${VSFM_HOME} + +http://ccwu.me/vsfm/download/VisualSFM_linux_64bit.zip + + +# BigSFM + +# MVE +http://www.gcc.tu-darmstadt.de/home/proj/mve/ + +# insight3d +http://insight3d.sourceforge.net/ +http://sourceforge.net/projects/insight3dng/ + +# Optical Targets used in professional application: +http://hubbsmachine.com/5-retro-reflective-tape-target +http://hubbsmachine.com/4-retro-reflective-contrast-photogrammetry-targets diff --git a/020_platformio-core.sh b/020_platformio-core.sh new file mode 100644 index 0000000..1eee345 --- /dev/null +++ b/020_platformio-core.sh @@ -0,0 +1,247 @@ +# http://docs.platformio.org/en/latest/faq.html#faq-install-shell-commands + +sudo apt-get install python python-pip checkinstall + +# sudo python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/develop/scripts/get-platformio.py)" + +# uninstall existing version +pip uninstall platformio + +# install the latest development version of PlatformIO + +PROJECT=platformio/platformio-core +RELEASE=$(curl "https://api.github.com/repos/${PROJECT}/releases?per_page=5" | jq -r '.[0] | .tag_name') +VERSION=$(echo "${RELEASE}" | cut -c 2- | cut -f1 -d"-") +PIO_BUILD_HOME=/var/tmp/platformio-core-"${VERSION}" + +mkdir -p "${PIO_BUILD_HOME}" && cd "${PIO_BUILD_HOME}" || exit +echo "PlatformIO Core (CLI tool) for embedded programming." > description-pak +mkdir -p doc-pak && wget -c --directory-prefix doc-pak https://raw.githubusercontent.com/platformio/platformio-core/develop/README.rst +echo "http://docs.platformio.org/en/latest/userguide/index.html" > doc-pak/README +sudo checkinstall --fstrans=no pip install -U https://github.com/platformio/platformio-core/archive/"${RELEASE}".zip + +# install some platforms +platformio platform install espressif8266 +platformio platform install espressif32 +platformio platform install nordicnrf51 +platformio platform install nordicnrf52 +platformio platform install ststm32 +platformio platform install timsp430 +platformio platform install atmelavr + +# To revert to the latest stable version +#pip uninstall platformio +#pip install -U platformio + + +# pip install puts the results in usr/local/bin so we don't have a path issue +#platformio: /usr/local/bin/platformio + +cat > ~/.zshrc.d/008_platformio.zsh << 'EOF' +if [[ -d "/usr/local/bin/platormio" ]]; then + + autoload bashcompinit && bashcompinit + eval "$(_PLATFORMIO_COMPLETE=source platformio)" + eval "$(_PLATFORMIO_COMPLETE=source pio)" +fi +EOF + +cat > ~/.profile << 'EOF' + +if [ -d "/usr/local/bin/platformio" ] ; then + + eval "$(_PLATFORMIO_COMPLETE=source platformio)" + eval "$(_PLATFORMIO_COMPLETE=source pio)" +fi +EOF + + +# http://docs.platformio.org/en/latest/faq.html#platformio-udev-rules +# https://raw.githubusercontent.com/platformio/platformio-core/develop/scripts/99-platformio-udev.rules +sudo bash -c "cat > /etc/udev/rules.d/99-platformio-udev.rules" << 'EOF' +# +# Boards +# + +# CP210X USB UART +SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE:="0666" + +# FT232R USB UART +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE:="0666" + +# Prolific Technology, Inc. PL2303 Serial Port +SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE:="0666" + +# QinHeng Electronics HL-340 USB-Serial adapter +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE:="0666" + +# Arduino boards +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="[08][02]*", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="[08][02]*", MODE:="0666" + +# Arduino SAM-BA +ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{MTP_NO_PROBE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", MODE:="0666" +KERNEL=="ttyACM*", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", MODE:="0666" + +# Digistump boards +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666" +KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1" + +# STM32 discovery boards, with onboard st/linkv2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374?", MODE:="0666" + +# USBtiny +SUBSYSTEMS=="usb", ATTRS{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0666" + +# USBasp V2.0 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE:="0666" + +# Teensy boards +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", ENV{MTP_NO_PROBE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", MODE:="0666" +KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", MODE:="0666" + +#TI Stellaris Launchpad +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666" + +#TI MSP430 Launchpad +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0666" + + +# +# Debuggers +# + +# Black Magic Probe +SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic GDB Server" +SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic UART Port" + +# opendous and estick +ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204f", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Original FT232/FT245 VID:PID +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Original FT2232 VID:PID +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Original FT4232 VID:PID +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Original FT232H VID:PID +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# DISTORTEC JTAG-lock-pick Tiny 2 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8220", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# TUMPA, TUMPA Lite +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a98", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a99", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# XDS100v2 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d0", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Xverve Signalyzer Tool (DT-USB-ST), Signalyzer LITE (DT-USB-SLITE) +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bca0", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bca1", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# TI/Luminary Stellaris Evaluation Board FTDI (several) +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bcd9", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# TI/Luminary Stellaris In-Circuit Debug Interface FTDI (ICDI) Board +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bcda", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# egnite Turtelizer 2 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bdc8", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Section5 ICEbear +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c140", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c141", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Amontec JTAGkey and JTAGkey-tiny +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# TI ICDI +ATTRS{idVendor}=="0451", ATTRS{idProduct}=="c32a", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# STLink v1 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# STLink v2 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# STLink v2-1 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Hilscher NXHX Boards +ATTRS{idVendor}=="0640", ATTRS{idProduct}=="0028", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Hitex STR9-comStick +ATTRS{idVendor}=="0640", ATTRS{idProduct}=="002c", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Hitex STM32-PerformanceStick +ATTRS{idVendor}=="0640", ATTRS{idProduct}=="002d", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Altera USB Blaster +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Amontec JTAGkey-HiSpeed +ATTRS{idVendor}=="0fbb", ATTRS{idProduct}=="1000", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# SEGGER J-Link +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0101", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0102", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0103", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0104", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0107", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0108", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1010", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1011", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1012", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1013", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1014", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1015", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1016", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1017", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1018", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Raisonance RLink +ATTRS{idVendor}=="138e", ATTRS{idProduct}=="9000", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Debug Board for Neo1973 +ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Olimex ARM-USB-OCD +ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0003", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Olimex ARM-USB-OCD-TINY +ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0004", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Olimex ARM-JTAG-EW +ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="001e", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Olimex ARM-USB-OCD-TINY-H +ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002a", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Olimex ARM-USB-OCD-H +ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002b", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# USBprog with OpenOCD firmware +ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c63", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board +ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Marvell Sheevaplug +ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Keil Software, Inc. ULink +ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2710", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# CMSIS-DAP compatible adapters +ATTRS{product}=="*CMSIS-DAP*", MODE="660", GROUP="plugdev", TAG+="uaccess" +EOF diff --git a/020_pycharm-install.sh b/020_pycharm-install.sh index 97c92a8..dd7a28b 100644 --- a/020_pycharm-install.sh +++ b/020_pycharm-install.sh @@ -1,32 +1,46 @@ ## pycharm python ide -#PYCHARM_VERSION=2016.3 -#cd /var/tmp && wget -c https://d1opms6zj7jotq.cloudfront.net/python/pycharm-community-${PYCHARM_VERSION}.tar.gz && tar xzvf /var/tmp/pycharm-community-${PYCHARM_VERSION}.tar.gz -#cd /var/tmp/pycharm-community-${PYCHARM_VERSION} +PYCHARM_VERSION=2018.1.4 +cd /var/tmp && wget -c https://download.jetbrains.com/python/pycharm-community-${PYCHARM_VERSION}.tar.gz && tar xzvf /var/tmp/pycharm-community-${PYCHARM_VERSION}.tar.gz -#cat << EF > ./install_pycharm.sh -#PYCHARM_VERSION=${PYCHARM_VERSION} -##cd /var/tmp -##wget -c http://download-cf.jetbrains.com/python/pycharm-community-${PYCHARM_VERSION}.tar.gz -#tar xzvf /var/tmp/pycharm-community-${PYCHARM_VERSION}.tar.gz -C /opt -#ln -fs /opt/pycharm-community-${PYCHARM_VERSION} /opt/pycharm -#ln -s /opt/pycharm/bin/pycharm.sh /usr/local/bin/pycharm -#ln -s /opt/pycharm/bin/inspect.sh /usr/local/bin/inspect -#cat << EOF > /opt/pycharm/pycharm.desktop -#[Desktop Entry] -#Type=Application -#Name=pyCharm IDE -#GenericName=Integrated Development Environment -#Comment=An IDE for the python programming language -#Exec=/opt/pycharm/bin/pycharm.sh -#Icon=/opt/pycharm/bin/pycharm.png -#Terminal=false -#Categories=Development;IDE;Electronics; -#MimeType=text/x-python -#Keywords=python;programming;ide; -#EOF -#EF +cd /var/tmp/pycharm-community-${PYCHARM_VERSION} || exit + +cat << EF > ./install_pycharm.sh +PYCHARM_VERSION=${PYCHARM_VERSION} +cd /var/tmp || exit +#wget -c http://download.jetbrains.com/python/pycharm-community-${PYCHARM_VERSION}.tar.gz +tar xzvf /var/tmp/pycharm-community-${PYCHARM_VERSION}.tar.gz -C /opt +ln -sf /opt/pycharm-community-${PYCHARM_VERSION} /opt/pycharm +ln -sf /opt/pycharm/bin/pycharm.sh /usr/local/bin/pycharm +ln -sf /opt/pycharm/bin/inspect.sh /usr/local/bin/inspect + +cat << EOF > /opt/pycharm/pycharm.desktop +[Desktop Entry] +Type=Application +Name=pyCharm IDE +GenericName=Integrated Development Environment +Comment=An IDE for the python programming language +Exec=/opt/pycharm/bin/pycharm.sh +Icon=/opt/pycharm/bin/pycharm.png +Terminal=false +Categories=Development;IDE;Electronics; +MimeType=text/x-python +Keywords=python;programming;ide; +EOF +EF + +cat << EOF > ./description-pak +PyCharm is an integrated development environment (IDE) used for the Python language. + +Coding assistance and analysis, with code completion, syntax and error highlighting, linter integration. +Python refactoring: extract method, introduce variable, introduce constant, pull up and push down. +Support for web frameworks: Django, web2py and Flask +Integrated Python debugger. +Integrated unit testing, with line-by-line code coverage. +Google App Engine Python development. +Version control integration: unified user interface for git. +EOF echo 'checkinstall -y --fstrans=no --install=no bash ./install_pycharm.sh 2>&1 | tee err' > checkinstall_pycharm.sh && bash ./checkinstall_pycharm.sh -dpkg -i /var/tmp/pycharm-community-${PYCHARM_VERSION}/pycharm-community_${PYCHARM_VERSION}-1_amd64.deb +dpkg -i /var/tmp/pycharm-community-"${PYCHARM_VERSION}"/pycharm-community_"${PYCHARM_VERSION}"-1_amd64.deb diff --git a/020_python-jf.sh b/020_python-jf.sh new file mode 100644 index 0000000..8e12ecc --- /dev/null +++ b/020_python-jf.sh @@ -0,0 +1,9 @@ +PROJECT=alhoo/jf +#RELEASE=$(curl --silent "https://api.github.com/repos/${PROJECT}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') +RELEASE=$(curl "https://api.github.com/repos/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') +JF_BUILD_HOME=/var/tmp/python-jf-"${RELEASE}" + +mkdir -p "${JF_BUILD_HOME}" && cd "${JF_BUILD_HOME}" || exit +echo "JF, is a jq-clone written in python. It supports evaluation of python oneliners, making it especially appealing for data scientists who are used to working with python." > description-pak +mkdir -p doc-pak && wget -c --directory-prefix doc-pak https://raw.githubusercontent.com/${PROJECT}/develop/README.rst +sudo checkinstall --fstrans=no pip install -U https://github.com/${PROJECT}/archive/"${RELEASE}".zip diff --git a/020_riot.sh b/020_riot.sh new file mode 100644 index 0000000..5e78943 --- /dev/null +++ b/020_riot.sh @@ -0,0 +1,10 @@ +sudo sh -c "echo 'deb https://riot.im/packages/debian/ artful main' > /etc/apt/sources.list-available/matrix-riot-im.list" + +sudo ln -s /etc/apt/sources.list-available/matrix-riot-im.list /etc/apt/sources.list.d/matrix-riot-im.list + +# Add the public key: +curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add - + +sudo apt-get update && apt-get -y install riot-web + + diff --git a/020_tmux.sh b/020_tmux.sh index 503f919..bc4eb7f 100644 --- a/020_tmux.sh +++ b/020_tmux.sh @@ -169,10 +169,11 @@ set -g pane-active-border-fg colour069 # 24 blue # set -g pane-active-border-bg black EOF -mkdir -p ~/.zshrc.d/ -echo "source /usr/share/zsh/vendor_completions/_tmuxinator" > ~/.zshrc.d/006_tmuxinator.zsh +#mkdir -p ~/.zshrc.d/ +#echo "source /usr/share/zsh/vendor_completions/_tmuxinator" > ~/.zshrc.d/006_tmuxinator.zsh mkdir -p ~/.tmux/plugins/tpm +mkdir -p ~/.tmux/.tmuxp #cat > ~/.config/tmux/tmux.conf << 'EOF' cat > ~/.tmux.conf << 'EOF' @@ -238,6 +239,19 @@ set -g @tpm_plugins ' \ # tmux-plugins/tmux-sensible \ #' +# tmux-resurrect will now restore vim and neovim sessions if `Session.vim` file is present. +# for vim resurrect +set -g @rsurrect-strategy-vim 'session' + +# for neovim resurrect +set -g @resurrect-strategy-nvim 'session' + +# panes +set -g @resurrect-capture-pane-contents 'on' + +# shell history +set -g @resurrect-save-shell-history 'on' + # Initialize TMUX plugin manager #run '~/.tmux/plugins/tpm/tpm' diff --git a/020_unetbootin.sh b/020_unetbootin.sh index e743f76..2035b0f 100644 --- a/020_unetbootin.sh +++ b/020_unetbootin.sh @@ -4,8 +4,10 @@ #apt-get update #apt-get install unetbootin +VERSION=661 + cd /var/tmp -wget -c https://github.com/unetbootin/unetbootin/releases/download/655/unetbootin-linux64-655.bin -chmod +x ./unetbootin-linux-* +wget -c https://github.com/unetbootin/unetbootin/releases/download/${VERSION}/unetbootin-linux64-${VERSION}.bin +chmod +x ./unetbootin-linux64-${VERSION}.bin apt-get install p7zip-full -./unetbootin-linux-* +./unetbootin-linux64-${VERSION}.bin diff --git a/020_vim.sh b/020_vim.sh index 9c0c2d0..7d3fb25 100644 --- a/020_vim.sh +++ b/020_vim.sh @@ -60,6 +60,11 @@ set showmatch let python_highlight_all = 1 syntax on +" Shortcut to rapidly toggle `set list` +nmap l :set list! + +" Use the same symbols as TextMate for tabstops and EOLs +set listchars=tab:▸\ ,eol:¬ " tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users @@ -136,6 +141,7 @@ call vundle#begin() Plugin 'VundleVim/Vundle.vim' " plugin on GitHub repos +Plugin 'joonty/vdebug' Plugin 'tpope/vim-fugitive' Plugin 'jreybert/vimagit' Plugin 'wincent/command-t' @@ -162,8 +168,17 @@ Plugin 'edkolev/tmuxline.vim' Plugin 'terryma/vim-multiple-cursors' Plugin 'sudar/vim-arduino-syntax' Plugin 'ekalinin/Dockerfile.vim' +Plugin ' mattboehm/vim-unstack' Plugin 'tmux-plugins/vim-tmux' +" vim-snipmate +Plugin 'MarcWeber/vim-addon-mw-utils' +Plugin 'tomtom/tlib_vim' +Plugin 'garbas/vim-snipmate + +" Optional: +Plugin 'honza/vim-snippets' + " requires tmux.conf setting: set -g focus-events on or tmux-plugins/tmux-sensible plugin. Plugin 'tmux-plugins/vim-tmux-focus-events' @@ -178,6 +193,13 @@ Plugin 'majutsushi/tagbar' Plugin 'scrooloose/nerdtree' Plugin 'jistr/vim-nerdtree-tabs' +map :NERDTreeToggle +silent! nmap :NERDTreeToggle +silent! map :NERDTreeFind + +let g:NERDTreeMapActivateNode="" +let g:NERDTreeMapPreview="" + Plugin 'saltstack/salt-vim' Plugin 'plasticboy/vim-markdown' Plugin 'fatih/vim-go' @@ -188,7 +210,7 @@ Plugin 'jmcantrell/vim-virtualenv' Plugin 'fisadev/vim-isort' " Automatically sort python imports " Python mode (indentation, doc, refactor, lints, code checking, motion and " operators, highlighting, run and ipdb breakpoints) -Plugin 'klen/python-mode' +Plugin 'python-mode/python-mode Plugin 'scrooloose/syntastic' Plugin 'scrooloose/nerdcommenter' Plugin 'sbdchd/neoformat' diff --git a/020_waterfox.sh b/020_waterfox.sh index 22e05c2..1d207ab 100644 --- a/020_waterfox.sh +++ b/020_waterfox.sh @@ -2,16 +2,18 @@ set -e mkdir -p /etc/apt//sources.list-available || exit cat > /etc/apt/sources.list-available/waterfox.list << EOF -# curl https://bintray.com/user/downloadSubjectPublicKey\?username\=hawkeye116477 | sudo apt-key add - -deb https://dl.bintray.com/hawkeye116477/waterfox-deb release main +# wget -nv https://download.opensuse.org/repositories/home:hawkeye116477:waterfox/Debian_Testing/Release.key -O Release.key +# apt-key add - < Release.key +deb http://download.opensuse.org/repositories/home:/hawkeye116477:/waterfox/Debian_Testing/ / EOF # The dl-bintray repo doesn't play nice with apt-proxy -echo "Acquire::http::Proxy { dl.bintray.com DIRECT; };" >> /etc/apt/apt.conf.d/02proxy +#echo "Acquire::http::Proxy { dl.bintray.com DIRECT; };" >> /etc/apt/apt.conf.d/02proxy ln -sf /etc/apt/sources.list-available/waterfox.list /etc/apt/sources.list.d/waterfox.list -curl "https://bintray.com/user/downloadSubjectPublicKey\?username\=hawkeye116477" | sudo apt-key add - +wget -nv https://download.opensuse.org/repositories/home:hawkeye116477:waterfox/Debian_Testing/Release.key -O Release.key +apt-key add - < Release.key apt-get update diff --git a/firefox-speedup.example b/firefox-speedup.example new file mode 100644 index 0000000..5399544 --- /dev/null +++ b/firefox-speedup.example @@ -0,0 +1,42 @@ +# browser.safebrowsing.remoteLookups unset +# browser.cache.use_new_backend 1 +# network.http.pipelining.ssl true +# network.http.pipelining true +# network.http.proxy.pipelining true +# network.http.pipelining.maxrequests 120 +# network.dns.disableIPv6 true +# browser.safebrowsing.malware.enabled false + +# browser.cache.disk.enable false +# browser.cache.memory.enable true +# browser.cache.memory.capacity integer 204800 + + + + +PROFILE_NAME=ybokieeb + +cd ${HOME}/.mozilla/firefox/ + +cp -a ${PROFILE_NAME}.default/ profile.bac + +rm -rf profile_name.default/* + +echo "tmpfs /home/${USER}/.mozilla/firefox/${PROFILE_NAME}.default tmpfs size=128M,user,exec,uid=1000,gid=1000 0 0" >> /etc/fstab + +sudo mount -a + +cd ${HOME}/.mozilla/firefox/ + +cp -a profile.bac/* ${PROFILE_NAME}.default/ + +echo > /usr/local/bin/ff_profile_sync < "EOF" +#!/bin/sh +cd /home/${USER}/.mozilla/firefox/ +if test -d *.default;then +if test -d profile.bac;then +rsync -a --delete *.default/ profile.bac/ +fi;fi +EOF + +(crontab -l 2>/dev/null; echo "*/5 * * * * /usr/local/bin/ff_profile_sync > /dev/null 2>&1") | crontab - diff --git a/thinkpad-dock.sh b/thinkpad-dock.sh index 1713506..d04bb39 100755 --- a/thinkpad-dock.sh +++ b/thinkpad-dock.sh @@ -7,7 +7,7 @@ case "$DOCKED" in #undocked event - lets remove all connected outputs apart from LVDS for output in $(/usr/bin/xrandr -d :0.0 --verbose|grep " connected"|grep -v LVDS|awk '{print $1}') do - /usr/bin/xrandr -d :0.0 --output $output --off + /usr/bin/xrandr -d :0.0 --output "$output" --off done ;; "1")