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 '($1=="_NET_WM_PID(CARDINAL)") {print $3}' | xargs ps h -o pid,cmd | xargs notify-send |
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
package edge; | |
import java.awt.BufferedImage; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
public class Repeated { | |
public static void main(String[] args) throws Exception { |
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 | |
# whybig - determine which files/subdirectories are biggest | |
# usage: whybig [directory] | |
# directory defaults to "." | |
dir=$1 | |
if [ -z $1 ]; then dir="."; fi | |
du $dir -d 1 | sort -rn |
This file has been truncated, but you can view the full file.
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
A | |
A's | |
AA's | |
AB's | |
ABM's | |
AC's | |
ACTH's | |
AI's | |
AIDS's | |
AM's |
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 urllib import request | |
import threading | |
def is_in_page(quiz_id): | |
try: | |
url = "http://www.quizegg.com/q/{0}".format(quiz_id) | |
req = request.urlopen(url) | |
lines = [] | |
for line in req: | |
lines.append(line.decode('utf-8')) |
This file has been truncated, but you can view the full file.
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
10000 1000 10000 | |
0 0.69024660249 0.0114775157247 | |
1 0.521697939172 0.961600288747 | |
2 0.108694552949 0.868495375713 | |
3 0.797198316646 0.511617073249 | |
4 0.526006389407 0.713361205614 | |
5 0.935532375017 0.0690046076888 | |
6 0.393969231644 0.202272409872 | |
7 0.690658903826 0.0738142387364 | |
8 0.887978406291 0.332721916227 |
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
# in ~/.bashrc | |
vle () { | |
if [ -n "$1" ]; then | |
name=$(basename -s ".tex" "$1") # trim off ".tex" if there is one | |
vim ${name}.tex && pdflatex ${name}.tex && evince ${name}.pdf | |
fi | |
} |
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 ruby | |
# cleantex | |
# usage: | |
# cleantex [texfile1 texfile2 ... texfileN] | |
# where each file can be a directory (runs on every tex file in directory) | |
# running "cleantex" with no arguments is equivalent to "cleantex ." | |
# a single trailing dot or ".tex" is ignored (equivalent: a.tex a. a) | |
require 'set' |
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
/* http://www.quora.com/Color-and-Colors/Are-there-any-colors-other-than-black-for-which-the-RGB-values-are-the-same-as-the-HSV-values */ | |
#include <stdio.h> | |
#include <stdbool.h> | |
float MIN(float a, float b, float c) { | |
if (a <= b && a <= c) return a; | |
if (b <= a && b <= c) return b; | |
return c; | |
} |
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 | |
DARK_BG='#000014141A1A' | |
# original: DARK_BG='#00002B2B3636' | |
LIGHTEST='#FFFFFBFBF0F0' | |
# original: LIGHTEST='#FDFDF6F6E3E3' | |
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false | |
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false | |
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/palette" --type string "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:$DARK_BG:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:$LIGHTEST" | |
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "$DARK_BG" |
OlderNewer