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
; AutoHotkey script to make CapsLock open URLs and search Google with Clipboard contents. | |
; By Nelson Minar <[email protected]> Inspired by code at http://www.autohotkey.com/forum/topic14656.html | |
CapsLock:: | |
url := RegExReplace(Clipboard, "^\s+|\s+$") ; Trim whitespace | |
if RegExMatch(url, "^(http|ftp|telnet)") { | |
; Do nothing if it already looks like a URL | |
} else { | |
; Escape the query string. Could escape more, but this seems sufficient for Chrome | |
StringReplace, url, url, `%, `%25, All |
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
-- On Heroku: | |
-- $ heroku pg:psql | |
-- An explaination of the columns on the pg_stat_activity table: | |
-- http://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW | |
select | |
pid, application_name, query, waiting, state, state_change | |
from pg_stat_activity | |
where usename = current_user | |
order by state_change desc; |
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
Trying to filter "out of office" emails from my inbox as I receive a lot of them when I send a blast. | |
I need help - what do your "out of office" emails say in your langauge? Comment Below! | |
## Gmail Filter | |
("Automatische Antwort" OR "Automatic reply" OR "AutoReply" OR "Out of Office" OR "Xesc Duran" OR "Abwesend" OR "Absence" OR "Absence du bureau" OR "À l'extérieur du bureau" OR "Réponse automatique" OR "Abwesenheitsnotiz" OR "Resposta automática" OR "Automaattinen vastaus" OR "Automatisch antwoord" OR "Afwezig" OR "Afwezigheid" OR "Niet aanwezig" OR "Poza zasięgiem" OR "Na wakacjach" OR "Poza biurem" OR "Automatyczna odpowiedź" OR "Z dala od komputera" OR "Αυτόματη απάντηση" OR "Εκτός γραφείου" OR "na dovolenké" OR "mimo kancelárie" OR "automatická odpověď" OR "Autosvar" OR "Fora do escritório" OR "na dovolené" OR "mimo kancelář") | |
## List | |
Automatische Antwort | |
Automatic reply |
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/bash | |
# | |
# https://twitter.com/samykamkar/status/1011166802880020482 | |
# Sniff network traffic from your iOS device, no jailbreak necessary! Just plug into your mac and run: | |
system_profiler SPUSBDataType|perl -0 -ne'/iP(?:hone|ad):.*?Serial Number: (\S+)/s?`rvictl -s $1`:0' ; sudo tcpdump -i rvi0 # standard tcpdump options/filters apply |
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
FileToLoad = ""; | |
Plane=0; // 0: XY, 1: XZ, 2: YZ | |
echo("File:", FileToLoad); | |
projection() { | |
if (Plane == 0) { | |
echo("Plane: XY"); | |
import(FileToLoad); | |
} else if (Plane == 1) { | |
echo("Plane: XZ"); |