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
import os | |
path = os.path.expanduser('~/.mozilla/firefox/') | |
path += filter(lambda file: file.endswith('.default'), os.listdir(path))[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 sh | |
URL="https://api.pushover.net/1/messages.json" | |
API_KEY="" | |
USER_KEY="" | |
DEVICE="" | |
TITLE="${1}" | |
MESSAGE="${2}" |
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 php | |
<?php | |
$address = isset($argv[2]) ? $argv[2] : '127.0.0.1'; | |
$port = isset($argv[3]) ? $argv[3] : 4028; | |
$command = isset($argv[1]) ? $argv[1] : 'summary'; | |
if (!$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) return; | |
if (!socket_connect($socket, $address, $port)) return socket_close($socket); |
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
function underscoreToCamelCase(value) { | |
return value.split('_').map(function(value) { return value.charAt(0).toUpperCase() + value.substr(1); }).join(''); | |
} |
NewerOlder