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
my_list = ['a','b','c'] | |
for index, value in enumerate(my_list): | |
print index, value | |
# This will print: | |
# 0 a | |
# 1 b | |
# 2 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
function hailIfCargoMatches(lookingFor, specialHail) | |
function closure(event, data) | |
local cargoname,_,_ = unpack(data) | |
if cargoname:find(lookingFor, 1, true) then | |
sendChat(specialHail,"PRIVATE",currentTarget) | |
end | |
end | |
return closure | |
end |
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
checking for gcc... gcc | |
checking for C compiler default output file name... a.out | |
checking whether the C compiler works... yes | |
checking whether we are cross compiling... no | |
checking for suffix of executables... | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether gcc accepts -g... yes | |
checking for gcc option to accept ISO C89... none needed | |
checking how to run the C preprocessor... gcc -E |
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
pkgname=mathpartir | |
pkgver=1.2 | |
pkgrel=2 | |
pkgdesc="Latex package for typesetting type inference rules" | |
arch=(any) | |
url="http://cristal.inria.fr/~remy/latex/" | |
license=('GPL') | |
install=install | |
source=('http://cristal.inria.fr/~remy/latex/mathpartir.dvi' | |
'http://cristal.inria.fr/~remy/latex/mathpartir.sty' |
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
habitue@chompy ~/b/libtasn1 $ makepkg PKGBUILD | |
==> Making package: lib32-libtasn1 2.8-2 (Fri Mar 11 02:14:09 EST 2011) | |
==> Checking Runtime Dependencies... | |
==> Checking Buildtime Dependencies... | |
==> Retrieving Sources... | |
-> Downloading libtasn1-2.8.tar.gz... | |
--2011-03-11 02:14:09-- ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.8.tar.gz | |
=> “libtasn1-2.8.tar.gz.part” | |
Resolving ftp.gnu.org... 140.186.70.20 | |
Connecting to ftp.gnu.org|140.186.70.20|:21... connected. |
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 turtle as T | |
from random import randint | |
def spiral(linefun, incr=4, angle=30, iterations = 30): | |
for i in xrange(0,iterations): | |
linefun(i*incr) | |
T.left(angle) | |
def regular_line(length): | |
T.forward(length) |
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
-- | |
-- xmonad example config file. | |
-- | |
-- A template showing all available configuration hooks, | |
-- and how to override the defaults in your own xmonad.hs conf file. | |
-- | |
-- Normally, you'd only override those defaults you care about. | |
-- | |
import XMonad |
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
for file in ./bad*; do ./dj-lex ${file} > /dev/null; if ["$?" != "0"]; then echo "lex error on ${file}"; fi; done |
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
--- | |
- Card: | |
name: Lumber Mill | |
type: Structure | |
cost: free | |
abilities: | |
- Produce: (L) | |
defense: 4 | |
unit_slots: 1 | |
- Card: |
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
{-# OPTIONS_GHC -fglasgow-exts #-} | |
module System.Console.CommandLine where | |
import System.Console.Haskeline | |
import Control.Monad.Trans (lift, MonadTrans) | |
import Control.Monad.State | |
import Control.Applicative | |
import qualified Data.Map as Map |