- Set up the folder
~/.awsenv/
with the folder structure shown below - Create a
credentials.txt
for every environment folder (see an example below) - Ensure no other user than yourself can view those files
- Create the function
set_aws
in~/.config/fish/functions/set_aws.fish
(see an example below) - Now load any environment using
set_aws <environment>
likeset_aws private
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 i in *.pdf; do I=$(echo $i | sed "s/^\(\([0-9]\{4\}\)\([0-9]\{2\}\).*\)$/\2\/\3\/\1/"); mkdir -p $(dirname $I) && mv $i $I; done |
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 python | |
import urllib, json | |
from dateutil.parser import parse | |
from textwrap import wrap | |
messages_url = 'https://status.github.com/api/messages.json' | |
data = json.loads(urllib.urlopen(messages_url).read()) | |
status_char = { |
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 python | |
import urllib, json, sys | |
if len(sys.argv) < 3: | |
print 'Usage: %s <lat,lon> <lat,lon>' % sys.argv[0] | |
sys.exit(2) | |
url = 'http://maps.googleapis.com/maps/api/directions/json?origin=%s&destination=%s&sensor=false' % (sys.argv[1], sys.argv[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
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...} | |
property processesToIgnore : {} | |
-- Get the size of the Display(s), only useful if there is one display | |
-- otherwise it will grab the total size of both displays | |
tell application "Finder" | |
set _b to bounds of window of desktop | |
set screen_width to item 3 of _b | |
set screen_height to item 4 of _b | |
end tell |
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 python2.7 | |
from uberspace import * | |
import argparse, sys, math | |
ST_OK = 0 | |
ST_WARN = 1 | |
ST_CRIT = 2 | |
ST_UNKN = 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
(* | |
Module: Sendmail | |
Parses simple key = "value" conffiles | |
Author: Knut Ahlers <[email protected]> | |
About: License | |
This file is licenced under the LGPL v2+, like the rest of Augeas. | |
*) |
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 python | |
import apt, os, re, sys, subprocess | |
if os.path.exists('/var/run/reboot-required'): | |
print 'reboot-required marker file exists' | |
sys.exit(1) | |
kernels = [] |
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 python | |
# Get an own access token from https://github.com/settings/applications | |
# and put it here to get this script working | |
access_token = 'nopeyoucantgetmine' | |
import urllib, urllib2, json, os, sys | |
rows, columns = [int(elem) for elem in os.popen('stty size', 'r').read().split()] |
A simple clone of the Dashing-Milkman widget which does not require API access to the API but uses the non-event iCalendar whose URL you can get on your dashboard.