This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name=sandrepo | |
remote=sand-pi:/home/sandrepo/http | |
repo="$name.db.tar.gz" | |
pkgext=.pkg.tar.xz | |
blacklist=/home/u8sand/Programs/Utils/blacklist | |
function update { | |
cd "$1" | |
for p in $(pacman -Qqm | grep -vf "$blacklist"); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alsa-firmware | |
arch-install-scripts | |
atom | |
b43-fwcutter | |
baka-mplayer | |
base-devel | |
btrfs-progs | |
cdrkit | |
clamav | |
clonezilla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wd=$(pwd) | |
#remote=root@host | |
run() { | |
local ret | |
if [ $remote ]; then | |
ssh $remote "$@" >&1; | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
vm="OSX" | |
VBoxManage modifyvm $vm --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff | |
VBoxManage setextradata $vm "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" | |
VBoxManage setextradata $vm "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
VBoxManage setextradata $vm "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-F2238BAE" | |
VBoxManage setextradata $vm "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" | |
VBoxManage setextradata $vm "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Draw module does everything through the draw function. | |
Usage: | |
from framework.draw import draw | |
# anything you would have put in different places for matplotlib | |
# one line | |
draw(title='Exponential', xlabel='t', ylabel='$e^t$', | |
kind='plot', y=np.exp(range(10))) | |
# multiline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
# 00-imports.py | |
import os | |
import re | |
import json | |
import numpy as np | |
import pandas as pd | |
import scipy as sp | |
from matplotlib import pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import sys | |
for i in sys.stdin: | |
if i.find('--------------------------------------------') != -1: | |
break | |
for l in sys.stdin: | |
print(','.join(l.split())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from util import * | |
from unittest import TestCase | |
class TestUtil(TestCase): | |
def test_path_set(self): | |
self.assertEquals( | |
path_set({}, 'a', 'b'), | |
{'a': 'b'}, | |
'Basic create') | |
self.assertEquals( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs=ext4 | |
function create { | |
fallocate -L $1 "$fs" | |
mount | |
dev=$(cat "$fs.lock") | |
mkfs -t ext4 $dev | |
fsck -t ext4 $dev | |
umount | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
conf=config.py | |
cert=mycert.pem | |
port=9999 | |
if [ ! -f $conf ]; then | |
if [ ! -f $cert ]; then | |
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout "$cert" -out "$cert" | |
fi |