This file contains hidden or 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 | |
zr=$(lsmod|grep zram) | |
if [ -z "$zr" ]; then | |
echo "load zram" | |
modprobe zram num_devices=5 | |
fi | |
if (("$#" == 0)); then | |
echo lz4 > /sys/block/zram0/comp_algorithm && | |
echo 4G > /sys/block/zram0/disksize && |
This file contains hidden or 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
#!/usr/bin/lua | |
local t = {} | |
mt = getmetatable ("t") | |
mt.__index["append"] = function (t,n) t[#t + 1] = n end | |
setmetatable(t, mt) | |
for n = 1,9000000 do |
This file contains hidden or 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
alias touchpad-fix='synclient TapButton1=1 TapButton2=3 TapButton3=2 HorizTwoFingerScroll=1 VertScrollDelta=-19 HorizScrollDelta=-19 LeftEdge=0 RightEdge=870 TopEdge=0 BottomEdge=470 MaxSpeed=1.2 AccelFactor=0.1' |
This file contains hidden or 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 | |
#this requires a ~/.ssh/config with your hosts | |
#and a /tmp/hostlist.csv with one hostname (must match to ~/.ssh/config/) per line | |
# 32 parallel threads | |
threads=32 | |
function remote_execute () { | |
echo $1 |
This file contains hidden or 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 numpy import exp, array, random, dot | |
class NeuronLayer(): | |
def __init__(self, number_of_neurons, number_of_inputs_per_neuron): | |
self.synaptic_weights = 2 * random.random((number_of_inputs_per_neuron, number_of_neurons)) - 1 | |
class NeuralNetwork(): | |
def __init__(self, layer1, layer2): |
This file contains hidden or 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
#!/usr/local/bin/python3 | |
import sys, mailbox | |
MAILDIR = sys.argv[1] | |
THIS_MAIL = "" | |
RECEIPT_FOUND = False | |
SUBJECT_FOUND = False | |
FILTER = {'[email protected]': 'markus', '[email protected]': 'fuckbook', '[email protected]': 'ebay'} |
This file contains hidden or 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
[alva@canopus ~]$ cat users/m/cur/1479372542.11112.canopus.uberspace.de\:2\,S | ./filter.py users/m/ | |
{'memory_peak': 167336.0, 'PID': 31778} | |
[alva@canopus ~]$ cat users/m/cur/1479372542.11112.canopus.uberspace.de\:2\,S | ./filter.lua users/m/ | |
13408 |
This file contains hidden or 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
[markus@arch ~]$ python2 this.py | |
/usr/lib/python2.7/site-packages/dejavu/database_sql.py:158: Warning: Table 'songs' already exists | |
cur.execute(self.CREATE_SONGS_TABLE) | |
/usr/lib/python2.7/site-packages/dejavu/database_sql.py:159: Warning: Table 'fingerprints' already exists | |
cur.execute(self.CREATE_FINGERPRINTS_TABLE) | |
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave | |
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave | |
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear | |
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe | |
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side |
This file contains hidden or 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
{ | |
"added_at":"2016-10-07T17:42:56Z", | |
"added_by":{ | |
"external_urls":{ | |
"spotify":"http://open.spotify.com/user/markuman" | |
}, | |
"href":"https://api.spotify.com/v1/users/markuman", | |
"id":"markuman", | |
"type":"user", | |
"uri":"spotify:user:markuman" |
This file contains hidden or 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
youtube-dl --prefer-ffmpeg --embed-thumbnail --add-metadata --metadata-from-title "%(artist)s - %(title)s" --audio-quality 0 --audio-format mp3 --extract-audio https://www.youtube.com/watch?v=mvK_5nNPKr8 |