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 | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
cd zsh |
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 | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
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 python | |
import os | |
import shlex | |
import struct | |
import platform | |
import subprocess | |
def get_terminal_size(): | |
""" getTerminalSize() |
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 | |
# --- long way | |
ROOT=`dirname $0` | |
ROOT=`cd $ROOT;pwd` | |
# --- short way | |
ROOT=$(cd $(dirname $0);pwd) | |
# --- with readlink | |
SELF=$(readlink -f $0) |
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 | |
# Ref: http://ubuntuforums.org/showthread.php?t=1751455 | |
# Install required libs | |
yes | apt-get install build-essential python-dev libjpeg62-dev zlib1g-dev libfreetype6-dev liblcms1-dev | |
# Link to correct location | |
if [ -d /usr/lib/x86_64-linux-gnu ]; then | |
# Ubuntu 11.04 64bit | |
ln -sf /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/ | |
ln -sf /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/ | |
ln -sf /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/ |
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 | |
if [ `which brew` = '' ]; then | |
echo "You have to install Homebrew first" | |
exit 1 | |
fi | |
echo "Installing required packages for PIL..." | |
brew install libjpeg | |
brew install https://raw.github.com/yuuna/homebrew/freetype/Library/Formula/freetype2.rb |
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 python | |
# vim: set fileencoding=utf8: | |
""" | |
TestCase module for testing App | |
Original code is found at | |
http://stackoverflow.com/questions/502916/django-how-to-create-a-model-dynamically-just-for-testing | |
""" | |
import copy |
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 python | |
# vim: set fileencoding=utf8: | |
""" | |
Django App TestCase | |
AUTHOR: | |
lambdalisue[Ali su ae] (lambdalisue@hashnote.net) | |
Copyright: |
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
ffmpeg -i INFILE -r 25 -f mpeg -vcodec mpeg1video -ar 48000 -b 1500k -acodec mp2 -ar 44100 -ac 1 -y OUTFILE.mpg |
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 xterm-256color based TERMINFO that adds the escape sequences for italic. | |
# | |
# Install: | |
# | |
# tic xterm-256color-italic.terminfo | |
# | |
# Usage: | |
# | |
# export TERM=xterm-256color-italic | |
# |
OlderNewer