Skip to content

Instantly share code, notes, and snippets.

View opexxx's full-sized avatar

Alexander Knorr opexxx

View GitHub Profile
@opexxx
opexxx / xor.py
Last active August 29, 2015 14:21 — forked from 013/xor.py
#!/usr/bin/python
# -*- coding: UTF-8 -*-
string = "something something something"
key = "cheese"
def crypt(string, key):
data = ''
for i in range(len(string)):
@opexxx
opexxx / pi-btsync.sh
Last active August 29, 2015 14:21 — forked from firmread/pi-btsync.sh
###
# setup btsync in pi
###
mkdir ~/.btsync && cd ~/.btsync
#wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_arm.tar.gz
wget https://download-cdn.getsyncapp.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz
tar -xvf BitTorrent-Sync_arm.tar.gz
echo "# run btsync and web interfact at port 8888" >> ~/.bashrc
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install netatalk
# already netatalk's dependency but if no netatalk, totally do this
# sudo apt-get install avahi-daemon
# so we can find raspberrypi.local
@opexxx
opexxx / rpi-todo.md
Last active August 29, 2015 14:21 — forked from vancetran/rpi-todo.md

Raspberry Pi: BitTorrent Sync

This Gist will install and configure BitTorrent Sync on a Raspberry Pi running Raspbian. By default, BT Sync will be bound to the address 127.0.0.1. Meaning the web interface is not accessible from any machine besides the Pi. This script will enable access from any machine on the network.

Installation

To perform the default installation of BT Sync, simply execute the following after SSHing onto the Pi.

curl -s -L http://go.trav.sh/pi_btsync | bash
#!/bin/sh
# Original script: https://gist.github.com/Wysie/7487571
#
# Script to route traffic from home network through VPN selectively.
# Based off the discussion at http://www.smallnetbuilder.com/forums/showthread.php?t=9311
# The setup is a Macbook, Apple Tv and a Raspberry Pi.
# The aim is to have all traffic from those 3 go through the VPN, all traffic from all other devices should bypassing the VPN.
#
# Requirements: Asuswrt-Merlin with OpenVPN already set up
#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the raw (<>) button.
### Set some command variables depending on whether we are root or not ###
# This assumes you use a debian derivate, replace with yum, pacman etc.
aptget='sudo apt-get'
chsh='sudo chsh'
@opexxx
opexxx / throughput.sh
Last active August 29, 2015 14:21 — forked from andsens/throughput.sh
#!/bin/sh
# Idea snatched from http://kb.sp.parallels.com/en/115348
# Command for quick installation:
# url='https://gist.githubusercontent.com/andsens/573186933e80a74462bb/raw/throughput.sh'; curl -so throughput.sh $url || wget --quiet -O throughput.sh $url; chmod +x throughput.sh
server() {
type pv > /dev/null 2>&1
if [ $? -eq 0 ]; then
while true; do
nc -l 1122 | pv --rate > /dev/null
printf "\n"
@opexxx
opexxx / GistList!.md
Created June 21, 2015 17:14
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

Verifying I am +opexxx on my passcard. https://onename.com/opexxx