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
/* CFLAGS = -Wall -Wextra -std=c99 -O2 | |
* | |
* Simply build and run, it will generate 4 images in pbm format. Use | |
* imagemagick's `convert` commandline tool, to scale them as well as generate | |
* an animated gif. | |
* | |
* $ convert *.pbm -scale 300x300 -loop 0 -delay 50 frames.gif | |
* | |
*/ |
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
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
namespace GenericFSM { | |
public class FSM<T> where T : struct, IConvertible { | |
public T State { get; private set; } |
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
module Try.Rewrite where | |
import qualified Data.Rewriting.Term as T | |
import qualified Data.Rewriting.Rule as R | |
import qualified Data.Rewriting.Rules as Rs | |
import qualified Data.Rewriting.Problem as P | |
-- operations | |
data Fun = Const Integer | |
| Add |
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
0000-0000-0000-000000000000 | |
0000-0000-0463-000360044655 | |
0000-0000-2008-100909290981 | |
0000-0000-2620-090844540040 | |
0000-0000-7084-704000000724 | |
0000-0000-7084-705000002215 | |
0000-0000-7090-704000000470 | |
0000-0000-7091-0J3000003249 | |
0000-0000-7093-3J2000000828 | |
0000-7777-0000-000059F8010F |
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 python3 | |
from pygments import lexers | |
for a in (alias for _, aliases, _, _ in lexers.get_all_lexers() for alias in aliases): | |
print(a) |
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 python3 | |
""" Convert LaTeX to SVG | |
This script will read LaTeX from stdin into a temporary file, compile it, | |
convert it to SVG and write it to stdout. Temporary files are removed upon | |
success. | |
Usage: ./tex2svg [template] |
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 python3 | |
from datetime import datetime, timedelta | |
from time import sleep | |
def time_mark(**timedelta_kwargs): | |
mark = datetime.now() + timedelta(**timedelta_kwargs) | |
while True: | |
yield datetime.now() > mark |
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
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
Option "VertResolution" "100" | |
Option "HorizResolution" "65" | |
Option "MinSpeed" "1" | |
Option "MaxSpeed" "1" | |
Option "AccelerationProfile" "2" | |
Option "AdaptiveDeceleration" "16" |
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 | |
# requires: | |
# set-option -ga update-environment ' TILE_NUM' | |
SESSION="$(date +%Y-%m-%d-%H-%M-%S)" | |
TILES="$1" | |
re='^[0-9]+$' | |
if [[ ! $TILES =~ $re ]]; 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
from time import sleep | |
class Worker(object): | |
def do_stuff(self): | |
print 'working' | |
def loop(self): | |
while True: |