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
def chunk_bytes(value, bit_length): | |
""" | |
Chunk value into bytes of bit_length | |
""" | |
for _ in range(0, value.bit_length(), bit_length): | |
yield value & ((1 << bit_length) - 1) | |
value >>= bit_length | |
def one_is_more_encode(value): |
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
""" | |
Script to use Wooting Gamepad as Mouse | |
""" | |
import asyncio | |
import collections | |
import signal | |
import sys | |
import evdev | |
import pyudev |
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 hashlib | |
import paramiko | |
a = paramiko.agent.Agent() | |
for key in a.get_keys(): | |
print(key.sign_ssh_data(hashlib.sha1(b'something to sign').digest())) |
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
ls "$1/"*|sed "s%^%file $PWD/%" > /tmp/dmlist | |
ffmpeg -f concat -protocol_whitelist file,pipe -safe 0 -i /tmp/dmlist -c copy "$1.mp4" |
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
ffmpeg -i "$1" -acodec copy -f segment -vcodec copy -reset_timestamps 1 -map 0 OUTPUT%04d.mp4 |
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
<?xml version='1.0'?> | |
<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd"> | |
<signatures version='1.0'> | |
<opaque name='IONotificationPortRef' type64='^{IONotificationPort=}'/> | |
<constant name='kIOMasterPortDefault' type64='I'/> | |
<string_constant name='kIOFirstPublishNotification' value='IOServiceFirstPublish'/> | |
<string_constant name='kIOPublishNotification' value='IOServicePublish'/> | |
<string_constant name='kIOMatchedNotification' value='IOServiceMatched'/> | |
<string_constant name='kIOFirstMatchNotification' value='IOServiceFirstMatch'/> | |
<string_constant name='kIOTerminatedNotification' value='IOServiceTerminate'/> |
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
# mpv | |
pasuspender -- mpv --audio-device=alsa/hdmi:CARD=HDMI,DEV=2 http://... | |
# scummvm | |
pasuspender -- env AUDIODEV=hdmi:CARD=HDMI,DEV=2 SDL_AUDIODRIVER=alsa scummvm |
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 requests_oauthlib | |
import click | |
import json | |
import datetime | |
import requests | |
def token_updater(tok): | |
with open("token.json", "w") as f: | |
json.dump(tok, f) |
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 | |
import socket | |
import uuid | |
import struct | |
import io | |
import sys | |
def unpack(stream, fmt): |
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
for W in *.wav ; do sox -v .01 $W lowvol/$W ; done |
NewerOlder