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
perl -ne '$H{$_}++ or print' |
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
def filestream(file, interval=1.0): | |
with open(file) as f: | |
while True: | |
where = f.tell() | |
line = f.readline() | |
if not line: | |
time.sleep(interval) | |
f.seek(where) | |
else: | |
yield line |
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 | |
sudo update-texmf | |
sudo texhash | |
sudo mktexlsr |
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
if application "iTerm" is running then | |
tell application "iTerm" | |
activate | |
set myterm to (make new terminal) | |
tell myterm | |
launch session "Default" | |
end tell | |
end tell | |
else | |
activate application "iTerm" |
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
def isiterable(obj): | |
return hasattr(obj, '__contains__') |
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
TEX = pdflatex -interaction nonstopmode | |
BIB = bibtex | |
GS = gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite | |
COVER = cover | |
PAPER = paper_main | |
SUPP = paper_supp | |
BIBFILE = temp.bib | |
BUNDLE = paper_bundle.pdf |
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 | |
######################################################################## | |
## This script is used to start/stop the dsmcad under ubuntu | |
## The original script was: start/stop mldonkey p2p client | |
## 2007 by Christoph Langner, published under the GPL v3 | |
## published on http://wiki.ubuntuusers.de/MLDonkey | |
## Changed the script to start/stop the dsmcad for ubuntu | |
## 2008 by Timo Scheller, published under the GPL v3 | |
## Modified, Feb. 2009 for Ubuntu Server 8.04.2 | |
## Modified, Feb. 2010, Fixed to change this ANS4042E: http://www-01.ibm.com/support/docview.wss?uid=swg21290640 |
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
CXXFLAGS=-Wall -Wextra -Werror -DLINUX | |
CXX_DEBUG_FLAGS=-g3 -DDEBUG_ALL | |
CXX_RELEASE_FLAGS=-O3 | |
.PHONY: debug | |
debug: CXXFLAGS+=$(CXX_DEBUG_FLAGS) | |
debug: HelloWorldD | |
.PHONY: release | |
release: CXXFLAGS+=$(CXX_RELEASE_FLAGS) |
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
''' | |
Code snippet to plot multiple triangle's in Matplotlib using different methods. | |
''' | |
import time | |
import sys | |
import matplotlib.pyplot as pp | |
import numpy as np | |
from matplotlib.collections import PolyCollection | |
import random | |
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
// | |
// Do any local configuration here | |
// | |
// Consider adding the 1918 zones here, if they are not used in your | |
// organization | |
//include "/etc/bind/zones.rfc1918"; | |
masters "ns-master-hgw" { | |
82.193.238.154; 2a01:a380:8408:1:216:3eff:fe2b:63b9; |
OlderNewer