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/env python | |
import sys, math | |
import cairo | |
if __name__ == '__main__': | |
master = cairo.ImageSurface.create_from_png(sys.argv[1]) | |
dest_width = int(sys.argv[2]) if len(sys.argv) > 2 else 256 | |
dest_height = int(sys.argv[3]) if len(sys.argv) > 3 else 256 | |
min_zoom = int(sys.argv[4]) if len(sys.argv) > 4 else 0 |
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/env python | |
import sys, os | |
import poppler | |
import cairo | |
if __name__ == '__main__': | |
uri = 'file://%s' % os.path.abspath(sys.argv[1]) | |
prefix = sys.argv[2] | |
width = int(sys.argv[3]) |
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/sh | |
# put in ~/.byobu/bin | |
REDSHIFT=/usr/bin/redshift | |
ELEVATION=$($REDSHIFT -pv | grep "Solar elevation" | sed -e 's/.*: //') | |
COLOR=$(echo $ELEVATION | awk '{ if ($0 > 6.0) { printf("gk"); } else if ($0 > -6.0) { printf("yk"); } else { printf("rk"); } }') | |
echo $ELEVATION $COLOR | awk '{ printf("\005{= %s}%.2f\xb0\005{-}\n", $2, $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
[globals] | |
version=v0.1_pre20121216-8-g500ebf9 | |
map.col_size=6 | |
map.row_size=6 | |
split=0 | |
update_map_initial_pos=24,8 | |
cfg.left=57 | |
cfg.right=57 | |
game_type=0 | |
game_tick=-63176704 |
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
<!doctype html> | |
<html> | |
<head> | |
<!-- | |
Donation Address: 1NiNja1bUmhSoTXozBRBEtR8LeF9TGbZBN | |
Notice of Copyrights and Licenses: | |
*********************************** | |
The bitaddress.org project, software and embedded resources are copyright bitaddress.org. | |
The bitaddress.org name and logo are not part of the open source license. |
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/env python | |
import dbus | |
if __name__ == '__main__': | |
bus = dbus.SystemBus() | |
manager_obj = bus.get_object('org.freedesktop.GeoClue2', '/org/freedesktop/GeoClue2/Manager') | |
manager = dbus.Interface(manager_obj, 'org.freedesktop.GeoClue2.Manager') | |
client_path = manager.GetClient() |
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
# -*- coding: utf-8 -*- | |
""" | |
doilinks | |
~~~~~~~~~~~~~~~~~~~ | |
Extension to add links to DOIs. With this extension you can use e.g. | |
:doi:`10.1016/S0022-2836(05)80360-2` in your documents. This will | |
create a link to a DOI resolver | |
(``https://doi.org/10.1016/S0022-2836(05)80360-2``). | |
The link caption will be the raw DOI. | |
You can also give an explicit caption, e.g. |
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/sh | |
DARK_MODE=/path/to/dark-mode | |
case $1 in | |
period-changed) | |
case $3 in | |
daytime) | |
$DARK_MODE --mode Light | |
;; | |
night) | |
$DARK_MODE --mode Dark |
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/env python | |
import pipes | |
from ansible.module_utils.basic import * | |
def query_group(module, port_path, group): | |
rc, out, err = module.run_command('{} select --list {}'.format( | |
pipes.quote(port_path), pipes.quote(group))) |
OlderNewer