mkdir -p ~/bin
cd ~/bin
curl -sSL http://deis.io/deisctl/install.sh | sh -s 1.2.0
curl -sSL http://deis.io/deis-cli/install.sh | sh -s 1.2.0(optional) install for all users
| from itertools import repeat | |
| import pandas as pd | |
| df = pd.DataFrame( | |
| { | |
| 'accountData': [ | |
| [{'key': 'name' ,'value': 'jim'}, {'key': 'schlong' ,'value': '27' }], | |
| [{'key': 'name' ,'value': 'cnagy'}, {'key': 'schlong' ,'value': '26' }], |
| #!/usr/bin/env bash | |
| set -ex | |
| input_image=$1 | |
| output_image=$2 | |
| ## Example usage: ./convert_to_favicon.sh icon.svg favicon.ico | |
| for d in 16 32; do | |
| convert -resize ${d}x${d} -flatten -colors 256 ${input_image} /tmp/favicon-${d}.ico | |
| done |
| sudo pacman -S polkit wpa_actiond | |
| systemctl enable [email protected] |
| function docker_debug { ([[ "$1" =~ ":" ]] || (echo "Failed. Specify tag" && false)) && echo -e "FROM $1\nUSER root\nRUN apt-get install --assume-yes ipython htop tcptrack tmux man\nRUN pip install cqlsh" | docker build -t $1-dbg - && docker run -it ${*:2} $1-dbg bash;}; |
| #!/usr/bin/env python | |
| from __future__ import print_function, division | |
| from operator import itemgetter | |
| import sys | |
| import json | |
| def json_filter(filter_keys, data): |
| #!/usr/bin/python | |
| ''' | |
| A Simple mjpg stream http server for the Raspberry Pi Camera | |
| inspired by https://gist.github.com/n3wtron/4624820 | |
| ''' | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| import io | |
| import time | |
| import picamera |
| # Released by rdb under the Unlicense (unlicense.org) | |
| # Based on information from: | |
| # https://www.kernel.org/doc/Documentation/input/joystick-api.txt | |
| import os, struct, array | |
| from fcntl import ioctl | |
| # Iterate over the joystick devices. | |
| print('Available devices:') |
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |
| // Conway's Game of Life for HTML5 Canvas | |
| // By Simon Laroche | |
| var FPS = 5; | |
| var paused = true; | |
| var gameStarted = false; | |
| var gLoop; | |
| var generations = 0; | |
| var population = 0; |