Skip to content

Instantly share code, notes, and snippets.

@yfix
yfix / cc.py
Created December 2, 2011 09:16 — forked from anonymous/cc.py
Useless C subset compiler
#!/usr/bin/env python
import sys
class Lexer:
NUM, ID, IF, ELSE, WHILE, DO, LBRA, RBRA, LPAR, RPAR, PLUS, MINUS, LESS, \
EQUAL, SEMICOLON, EOF = range(16)
SYMBOLS = { '{': LBRA, '}': RBRA, '=': EQUAL, ';': SEMICOLON, '(': LPAR,

Multiple PHP version under Ubuntu 14.04

Update your machine

apt-get update
apt-get upgrade

Install some dependencies

apt-get install build-essential

#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
@yfix
yfix / teamcity
Last active August 29, 2015 14:06 — forked from AlainODea/teamcity
#!/bin/bash
#
# chkconfig: 235 10 90
# description: TeamCity startup script
#
TEAMCITY_USER=teamcity
TEAMCITY_DIR=/home/teamcity/TeamCity/
TEAMCITY_SERVER=bin/teamcity-server.sh
@yfix
yfix / bash_source.sh
Last active August 29, 2015 14:07 — forked from gipi/bash_source.sh
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@yfix
yfix / SVG-Loading-icons.markdown
Created October 29, 2014 11:11
A Pen by Aurer.
@yfix
yfix / Sweet-&-Pure-CSS3-UISwitch.markdown
Created October 29, 2014 11:11
A Pen by Christian Petersen.

Some :active & :focus effects

I had some freetime, and I wanted to try some things.

A Pen by LukyVJ on CodePen.

License.

@yfix
yfix / CSS3-Working-Clock.markdown
Created October 29, 2014 11:15
A Pen by Ilia.