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 | |
# vim: set fdm=marker: | |
import argparse | |
import atexit | |
import base64 | |
import configparser | |
import datetime | |
import decimal | |
import os |
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/sh | |
# Requires AWS CLI version 1 (`pip3 install awscli`) | |
if ! [ -f "$1" ]; then | |
printf %s " | |
This script should be used as the shebang line in another script that looks like | |
the following (assuming this script is on \$PATH): |
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/sh | |
uid=$(id -u) | |
if pgrep -u $uid -x 'xterm' >/dev/null 2>&1; then | |
pkill -u $uid -x 'xterm' | |
else | |
xrandr_size=$(xrandr --current --prop | head -n 1 \ | |
| grep -o 'current [0-9]\+ x [0-9]\+' \ | |
| sed -e 's/current //g; s/ x /\n/g') |
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/sh | |
ADDRESSES=' | |
eth0=2001:db8::2 eth0=2001:db8:2::1 | |
eth0=192.0.2.2 eth0=198.51.100.2 eth0=203.0.113.2 eth0=233.252.0.2 | |
' | |
################################################################################ | |
set -e |
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
"use strict"; | |
//export default | |
class EmojiFavicon { | |
static DEFAULT_ATTRIBUTE_NAME() { return "data-emoji-favicon"; } | |
static set(emoji, shadowColor, size) { | |
shadowColor = (typeof shadowColor === "string") ? shadowColor : null; |
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
// Imports {{{1 | |
use std::io; | |
extern crate byteorder; // 1 | |
use byteorder::{/*ReadBytesExt,*/ LittleEndian}; | |
extern crate num_traits; // 0.2 | |
use num_traits::ToPrimitive; |
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
MBTN_LEFT set pause no | |
MBTN_RIGHT cycle fullscreen | |
MBTN_RIGHT_DBL cycle fullscreen | |
WHEEL_UP add volume 2 | |
WHEEL_DOWN add volume -2 | |
WHEEL_LEFT ignore | |
WHEEL_RIGHT ignore | |
- add volume -2 | |
= add volume 2 | |
+ add volume 2 |
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
-- input.conf usage: <key> script-message show-script-opt <opt-name> <default> | |
-- Example: t script-message show-script-opt osc-title "${media-title}" | |
mp.register_script_message("show-script-opt", function(name, default) | |
local value = mp.get_opt(name) | |
if not (value == nil or value == "") then | |
value = mp.command_native({"expand-text", value}) | |
else | |
value = default or "(unavailable)" | |
end |
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/sh | |
if [ $# -ne 1 ]; then | |
echo "Usage: $(basename -- "$0") <image-file>" >&2 | |
exit 2 | |
fi | |
7z -so e "$1" usr/lib/opkg/status \ | |
| grep '^Package:' | cut -d' ' -f 2 | sort |