Add a button to initiate download of a single file from a file page on Github.
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
# Tested on Ubuntu 12.04 | |
# Copied from: http://askubuntu.com/questions/74904/how-can-i-swap-capslock-for-backspace | |
setxkbmap -option caps:backspace | |
setxkbmap -option shift:both_capslock | |
xmodmap -e "clear Lock" |
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
# First find out the inode by | |
# ls -il . | |
# Then delete file | |
sudo find . -inum $1 -exec rm -rf {} \; |
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
[Dialer Defaults] | |
Phone = | |
Username = | |
Password = | |
New PPPD = yes | |
[Dialer mts] | |
Stupid Mode = 1 | |
Inherits = Modem0 | |
Password = mts |
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 math | |
from text.blob import TextBlob as tb | |
def tf(word, blob): | |
return blob.words.count(word) / len(blob.words) | |
def n_containing(word, bloblist): | |
return sum(1 for blob in bloblist if word in blob) | |
def idf(word, bloblist): |
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
cd lib/logger/ && make -f Makefile | |
make[1]: Entering directory `/home/dufferzafar/dev/clones/lastfm-desktop/lib/logger' | |
compiling ../../common/c++/Logger.cpp | |
rm -f liblogger.a | |
ar cqs liblogger.a _build/Logger.o | |
rm -f ../../_bin/liblogger.a | |
mv -f liblogger.a ../../_bin/ | |
make[1]: Leaving directory `/home/dufferzafar/dev/clones/lastfm-desktop/lib/logger' | |
cd lib/unicorn/ && make -f Makefile | |
make[1]: Entering directory `/home/dufferzafar/dev/clones/lastfm-desktop/lib/unicorn' |
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 service postgresql stop | |
sudo pg_dropcluster 9.1 main | |
sudo pg_createcluster 9.1 main | |
sudo pg_ctlcluster 9.1 main start | |
sudo service postgresql start |
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
~/d/c/openage (pr/172) > ./configure | |
_________________________________________ | |
/ ./configure is a convenience script \ | |
| that creates the build directory and | | |
| invokes cmake for an out-of-source | | |
| build. | | |
| | | |
| don't feel obliged to use this, | | |
\ especially if you're packaging openage. / | |
----------------------------------------- |
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 view(html, rm=False): | |
"""View HTML in a browser.""" | |
# So many imports :O | |
import os | |
import webbrowser | |
import string | |
import random | |
# Remove preview random files |
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
/* | |
* GL05IdleFunc.cpp: Translation and Rotation | |
* Transform primitives from their model spaces to world space (Model Transform). | |
*/ | |
#include <windows.h> // for MS Windows | |
#include <GL/glut.h> // GLUT, include glu.h and gl.h | |
// Global variable | |
GLfloat angle = 0.0f; // Current rotational angle of the shapes |