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
#include <stdio.h> | |
#include <queue> | |
#include <unistd.h> | |
#include <pthread.h> | |
#include <stdlib.h> | |
// Base task for Tasks |
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/perl | |
# By: Jeremiah LaRocco | |
# Use translate.google.com to translate between languages. | |
# Sample run: | |
# gtrans.pl --to french --from english This is a test | |
# Ceci est un test | |
# | |
use strict; |
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 python3 | |
# Use lxml to validate XML against a DTD | |
import re | |
import sys | |
import os.path | |
import codecs | |
from lxml import etree |
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
#include <iostream> | |
class WTF { | |
public: | |
WTF() : val(this) { } | |
WTF* operator->() { | |
std::cout << "hello "; | |
return this; | |
} | |
WTF &operator*() { |
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
#include <iostream> | |
#include <vector> | |
#include <string> | |
int main(int argc, char *argv[]) { | |
std::vector<int> bob(1); | |
bob.push_back(20); | |
bob.push_back(bob[0]); | |
for (auto it = bob.begin(); | |
it != bob.end(); |
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
; Read Later | |
F9=Go to page,"javascript:{q=location.href;p=document.title;void(t=open('https://pinboard.in/add?later=yes&noui=yes&jump=close&url='+encodeURIComponent(q)+'&title='+encodeURIComponent(p),'Pinboard', 'toolbar=no,width=100,height=100'));t.blur();}" | |
; With tags | |
F10=Go to page,"javascript:{q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard', 'toolbar=no,width=700,height=600'));}" |
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/python3 | |
import os | |
import sys | |
import math | |
import random | |
from datetime import datetime |
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 python3 | |
# Launch an application on a new desktop | |
# The motivation for this is another script that runs depends.exe in profiling mode. | |
# When depends.exe profiles the application the application's windows pop-up and get | |
# in the way. It's really annoying, hence spawndesk.py | |
import sys | |
import random | |
import win32con |
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 python3 | |
import sys | |
import random | |
import functools | |
from PyQt4 import QtGui, QtCore | |
@functools.lru_cache(maxsize=100) | |
def factorial(n): |
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/zsh | |
ls -Q -d . | xargs du -b -- | \ | |
sort -n |\ | |
perl -e 'while (<>) { @p = split; $sz = shift @p;\ | |
printf("%3.2f MB \t@p\n",$sz/(1024*1024)); }' |