Skip to content

Instantly share code, notes, and snippets.

View makzan's full-sized avatar
🎯
Focusing

Thomas Seng Hin Mak makzan

🎯
Focusing
View GitHub Profile
@comfuture
comfuture / PList.as
Created January 27, 2011 01:49
simple plist parser for actionscript
package maroo.codec
{
import flash.utils.ByteArray;
import mx.utils.Base64Decoder;
public class PList
{
public static function parse(source:XML):Object
{
switch (source.name().localName) {
@mrsweaters
mrsweaters / setup.sh
Created February 5, 2012 04:18 — forked from erotte/server_setup.md
Vagrant Box Setup Ruby 1.9.3/Nginx/Passenger/MySQL
#!/usr/bin/env bash
# login as root and run this script via bash & curl:
apt-get update
apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \
git-core zlib1g zlib1g-dev libopenssl-ruby libcurl4-openssl-dev libssl-dev \
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev \
mysql-client mysql-server
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@tobyhede
tobyhede / gist:3179978
Created July 26, 2012 02:53
Ruby/Rails date format cheat sheet
From http://linux.die.net/man/3/strftime
%a - The abbreviated weekday name (``Sun'')
%A - The full weekday name (``Sunday'')
%b - The abbreviated month name (``Jan'')
%B - The full month name (``January'')
%c - The preferred local date and time representation
%d - Day of the month (01..31)
%e - Day of the month without leading 0 (1..31)
%g - Year in YY (00-99)
@makzan
makzan / using-foundation-reveal.js
Created August 22, 2012 08:14
About Using Reveal Modal in Zurb Foundation CSS Framework
// About Using Reveal Modal in Zurb Foundation CSS Framework
// Show a modal (documented in Foundation doc)
$('#modal').reveal(options)
// The followings are not documented in Foundation doc.
// Close a modal
$('#modal').trigger('reveal:close');
// Close all modal
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

#!/bin/sh
# 1. Sign up at https://www.digitalocean.com
# 2. Go to: https://www.digitalocean.com/droplets
# 3. Create Ubuntu 12.10 x64 server droplet
# 4. Get email with root credentials, IP and password
# 5. Open terminal on a Mac
# 6. SSH into into server as root: ssh -l root IPADDRESS-FROM-EMAIL
# 7. Enter root Password
# 8. Create this script: nano deployd-install.sh
@riywo
riywo / gist:5000181
Created February 20, 2013 22:15
How to delete git remote(origin) branch or tag?
# branch
$ git branch -d BRANCH # delete local BRANCH
$ git push origin :BRANCH # delete remote BRANCH
# tag
$ git tag -d TAG # delete local TAG
$ git push origin :refs/tags/TAG # delete remote TAG
@chrisyip
chrisyip / vagrant-lamp.sh
Created May 8, 2013 11:58
Vagrant shell script for LAMP.
#!/usr/bin/env bash
apt-get update
echo mysql-server-5.5 mysql-server/root_password password PASSWORD | debconf-set-selections
echo mysql-server-5.5 mysql-server/root_password_again password PASSWORD | debconf-set-selections
apt-get install -y mysql-common mysql-server mysql-client
apt-get install -y apache2
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.