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 | |
import webbrowser | |
def main(): | |
return 42/0 | |
def excepthook(type_, value, traceback): | |
webbrowser.open_new_tab('https://stackoverflow.com/search?q=[python] {} {}'.format(type_, value)) |
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 auto_activate(){ | |
name=$(basename "$PWD") | |
project_dir="$HOME/workspace/$name" | |
env_dir="$HOME/envs/$name" | |
if [ -d "$env_dir" ]; then | |
workon "$name" | |
fi | |
} | |
auto_activate |
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
/** | |
* @fileoverview Provides the custom function BUGZILLA_TITLE and | |
* the helper functions that it uses. | |
*/ | |
/** | |
* Runs when the add-on is installed. | |
*/ | |
function onInstall() { | |
onOpen(); |
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
console.clear(); | |
function getFields(fields, parent){ | |
var rows = [" fields = ("]; | |
$(fields, parent).each(function(){ | |
var regex = /field-([^ ]+)/g; | |
var columns = []; | |
while(match = regex.exec(this.className)){ | |
columns.push(match[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
# -*- coding: utf-8 -*- | |
# | |
# This file is a plugin for EventGhost. | |
# Copyright (C) 2012 Walter Kraembring <krambriw>. | |
# | |
# ALL RIGHTS RESERVED. The development of this software is based on information | |
# provided by RFXCOM and is protected under Netherlands Copyright Laws and | |
# Treaties and shall be subject to the exclusive jurisdiction of the Netherlands | |
# Courts. | |
# This pluginís source code and other versions eventually based on it may be |
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
// ==UserScript== | |
// @name Computer Futures Worksheet Usability Enhancer | |
// @namespace http://wol.ph/ | |
// @description try to take over the world! | |
// @author Wolph | |
// @match https://worksheets.computerfutures.com/index.php?* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ | |
'use strict'; |
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
// ==UserScript== | |
// @name Computer Futures Worksheet Filler | |
// @namespace http://wol.ph/ | |
// @version 1.1 | |
// @description | |
// @match https://worksheets.computerfutures.com/index.php?dir=timesheet* | |
// @match http://worksheets.computerfutures.com/index.php?dir=timesheet* | |
// @copyright 2015, Wolph | |
// @run-at document-end | |
// ==/UserScript== |
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 -e | |
function image_all(){ | |
echo "Processing $1" | |
test -d "$1" || return 1 | |
cd "$1" | |
for i in *; do | |
if [ "$i" == "utils" ]; then | |
continue |
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
Y = lambda f: lambda *args: f(Y(f))(*args) | |
quicksort = Y(lambda f: | |
lambda x: ( | |
f([item for item in x if item < x[0]]) | |
+ [y for y in x if x[0] == y] | |
+ f([item for item in x if item > x[0]]) | |
) if x else []) |
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
from gevent.local import local | |
from gevent.pywsgi import WSGIServer | |
from gevent import monkey | |
import socket | |
import pprint | |
import sys | |
def application(environ, start_response): | |
url = environ['PATH_INFO'] |