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
function join { | |
local IFS="$1" | |
shift | |
echo "$*" | |
} | |
export CUSTOM_PATHS=( | |
"$HOME/Apps/myapp" | |
"$HOME/Apps/myapp2/bin" | |
) |
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 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from ConfigParser import ConfigParser | |
from subprocess import Popen, PIPE, STDOUT | |
# Place your own settings here | |
filepath = (os.environ['HOME'], '.mypwfile.gpg') |
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
<?php | |
// Conf | |
$secret = 'mysecret'; | |
$command = '/path/to/script.sh'; | |
function fail($msg) { | |
http_response_code(400); | |
echo $msg; | |
exit(1); |
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 | |
# usage: mailapp.sh [url] | |
EMACS="/usr/bin/emacs" | |
EMACSCLIENT="/usr/bin/emacsclient" | |
SOCKET_NAME="email" | |
SOCKET_PATH="/tmp/emacs$(id -u)/$SOCKET_NAME" | |
log() { |
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 tornado.ioloop | |
import tornado.web | |
import pprint | |
class MyDumpHandler(tornado.web.RequestHandler): | |
def post(self): | |
pprint.pprint(self.request) | |
pprint.pprint(self.request.body) |
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 | |
xprop |awk ' | |
/^WM_CLASS/{sub(/.* =/, "instance:"); sub(/,/, "\nclass:"); print} | |
/^WM_NAME/{sub(/.* =/, "title:"); print}' |
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 sys | |
entry_t = """<entry> | |
<title>{title}</title> | |
<username>{username}</username> | |
<password>{password}</password> | |
<notes>{info}</notes> | |
</entry>""" | |
pwfile_t = """<!DOCTYPE KEEPASSX_DATABASE> |
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" encoding="UTF-8"?> | |
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!--Last edited by Ukelele version 2.2.4 on 2013-02-08 at 22:01 (UTC+2.00)--> | |
<keyboard group="0" id="5591" name="AltFin" maxout="1"> | |
<layouts> | |
<layout first="0" last="17" modifiers="f4" mapSet="16c"/> | |
<layout first="18" last="18" modifiers="f4" mapSet="984"/> | |
<layout first="21" last="23" modifiers="f4" mapSet="984"/> | |
<layout first="30" last="30" modifiers="f4" mapSet="984"/> | |
<layout first="194" last="194" modifiers="f4" mapSet="984"/> |
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
(ns jkpl.fasttrack | |
(:require [clojure.string :as s] | |
[clojure.java.io :as io])) | |
(defn string-to-numbers | |
"Converts string of numbers to a list of numbers" | |
[s] | |
(->> (s/split s #" ") | |
(map read-string))) |