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
sudo modprobe v4l2loopback card_label="GoPro" video_nr=1 | |
ip -4 --oneline link | grep -v "DOWN\|LOOPBACK\|NO-CARRIER" | cut -f2 -d: | tail -1 | xargs ip -4 addr show dev | grep -Po '(?<=inet )[\d.]+' | |
curl 172.23.146.51/gp/gpWebcam/START | |
fmpeg -nostdin -threads 1 -i 'udp://@0.0.0.0:8554?overrun_nonfatal=1&fifo_size=50000000' -f:v mpegts -fflags nobuffer -vf format=yuv420p -f v4l2 /dev/video1 |
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
#!/usr/bin/env python3 | |
import requests | |
import json | |
import time | |
from influxdb import InfluxDBClient | |
import os | |
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)) | |
if __name__ == "__main__": | |
API_KEY = None |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import csv | |
import sys | |
def calculate_candidates(hdds): | |
# Gather candidate drives with enough free space | |
for hdd in hdds: | |
candidates = filter(lambda x: x['free'] >= hdd['used'] and x['name'] != hdd['name'], hdds) | |
candidates = sorted(candidates, key=lambda x: x['free']) |
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
#!/usr/local/bin/node | |
const torrent = require('torrent-stream') | |
const mag = process.argv.slice(2)[0]; | |
const download = function(input, id) { | |
const dl = torrent(input, {path: '/path/to/plex/folder'}) | |
dl.on('ready', function () { | |
dl.files.forEach(function (file) { | |
file.select(); | |
}); |
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
#include "DigiKeyboard.h" | |
void setup() { | |
DigiKeyboard.sendKeyStroke(0); | |
DigiKeyboard.sendKeyStroke(KEY_SPACE, MOD_GUI_LEFT); | |
DigiKeyboard.println("terminal"); | |
DigiKeyboard.delay(50); | |
DigiKeyboard.println("wget -q http://www.brainyquote.com/link/quotebr.js -O - |grep -o -E '\\\"[A-Z].*\\.' | cowsay -f stegosaurus"); | |
pinMode(1, OUTPUT); | |
} |
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
import crypt | |
import hmac | |
def dictionaryAttack(wordlist, hash): | |
passwords = open(wordlist, encoding='utf-8') | |
for password in passwords: | |
if hmac.compare_digest(crypt.crypt(password, hash), hash): | |
print('%s = %s' % (hash, password)) | |
return |
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
### Keybase proof | |
I hereby claim: | |
* I am totu on github. | |
* I am totu (https://keybase.io/totu) on keybase. | |
* I have a public key whose fingerprint is 3696 DE03 8297 76D9 34D1 9F2F 6594 CCB9 B07A 750F | |
To claim this, I am signing this object: |
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
sudo tshark -q -S -l -i mon0 -R 'wlan.fc.type_subtype eq 4' -T fields -e wlan.sa -e wlan_mgt.ssid -e radiotap.dbm_antsignal -e frame.time -E separator=, |
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
require 'open-uri' | |
r = '', a = [] | |
uri = URI.parse("http://data.fmi.fi/fmi-apikey/cdc84a28-60b7-44c3-ad5d-442d34edc435/wfs?request=getFeature&storedquery_id=fmi::observations::weather::daily::multipointcoverage&place=riihimaki&starttime=2013-05-10"); | |
uri.open do |http| | |
r = http.read.inspect | |
end | |
days = /<gmlcov:positions>+.+<\/gmlcov:positions>/.match(r)[0].gsub(/<\/?[^>]*>/, '').split(' ').length/3 |
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
var fs = require('fs') | |
, mongojs = require('mongojs') | |
, db = mongojs('census', ['things']) | |
, file = 'census.txt'; | |
if (process.argv[2]) file = process.argv[2]; | |
fs.readFile(file, function (err, d) { | |
if (err) throw err; | |
db.things.find().count(function(err, startCount) { |
NewerOlder