Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'Can be used for streaming data (webcam or screen capture) from the Windows to WSL
Run from a WSL terminal
ip route list default | awk '{print $3}'| # Manual opt parsing example | |
| # | |
| # Features: | |
| # - supports short and long flags (ie: -v|--verbose) | |
| # - supports short and long key/value options (ie: -f <file> | --filename <file>) | |
| # - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>) | |
| # - does NOT support short option chaining (ie: -vh) | |
| # - everything after -- is positional even if it looks like an option (ie: -f) | |
| # - once we hit an arg that isn't an option flag, everything after that is considered positional | |
| function optparsing_demo() { |
| gpg-connect-agent <<EOF | |
| /hex | |
| scd serialno | |
| scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
| scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
| scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
| scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
| scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 | |
| scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 | |
| scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 |
| # Depends on: | |
| # paperkey (jabberwocky.com/software/paperkey/) | |
| # libqrencode (fukuchi.org/works/qrencode/) | |
| # Producing the QR codes: | |
| # Split into 16 codes to ensure the data per image is not too large. | |
| # Or split into 3 codes for smaller keys (e.g., ed25519) | |
| gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
| if [ "$(uname)" == "Darwin" ]; then | |
| split -n 16 temp IMG |
| #!/bin/sh | |
| # 1) Install Xcode 11 | |
| # 2) Install command line tools: `xcode-select --install` | |
| # 3) Install HomeBrew | |
| # 4) brew tap cartr/qt4 && brew install cartr/qt4/[email protected] subversion rbenv | |
| # 5) Setup rbenv | |
| # 6) Run this command | |
| PKG_CONFIG_PATH="$(brew --prefix cartr/qt4/[email protected])/lib/pkgconfig" \ |
| mkdir ~/vim | |
| cd ~/vim | |
| # Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
| # Compiled on Jul 20 2017 | |
| curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
| export VIMRUNTIME="$HOME/vim/runtime" | |
| export PATH="$HOME/vim:$PATH" | |
| cd - |
| Port: 1080 | |
| 1. Create a file /YOUR PATH/gitproxy.sh with content: | |
| #!/bin/sh | |
| nc -X 5 -x 127.0.0.1:1080 "$@" | |
| 2. Edit your ~/.gitconfig | |
| # For git:// |
| main() { | |
| # Use colors, but only if connected to a terminal, and that terminal | |
| # supports them. | |
| if which tput >/dev/null 2>&1; then | |
| ncolors=$(tput colors) | |
| fi | |
| if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then | |
| RED="$(tput setaf 1)" | |
| GREEN="$(tput setaf 2)" | |
| YELLOW="$(tput setaf 3)" |
| # set the base image to Debian | |
| # https://hub.docker.com/_/debian/ | |
| FROM debian:latest | |
| # replace shell with bash so we can source files | |
| RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
| # update the repository sources list | |
| # and install dependencies | |
| RUN apt-get update \ |
Install phantomjs (http://phantomjs.org)
brew has a recipe for phantomjs, but it has moved on to version 2.0.0, and we still require 1.8.2 (at newest), and we can't get that old and dirty with brew anymore.
On a Mac:
mkdir -p ~/root
wget https://phantomjs.googlecode.com/files/phantomjs-1.8.2-macosx.zip -O ~/root/phantomjs-1.8.2-macosx.zip