Skip to content

Instantly share code, notes, and snippets.

View wastemobile's full-sized avatar

wastemobile wastemobile

View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active November 2, 2024 12:56
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@designermonkey
designermonkey / A-Symphony-Workflow.markdown
Created February 17, 2011 00:51
Just mapping out a git workflow for Symphony development

A Symphony Workflow

I'm describing my workflow in these articles, before I start my next Symphony project. Mostly for myself, to iron out my recurring problems, it is based on solid git techniques, taking heed of advice learned from Symphony community members, many many tips on the web, and flicking through the pages of O'Reilly's Version Control with git.

The core aim of this article, is to get a good Symphony development and deployment environment using git as the basis for the organisation, and have it written down for reference.

This workflow can be applied to any project, in theory, that has a starting point being a private remote git repo.

Disclaimer

@maylogger
maylogger / self-clear.scss
Created March 16, 2011 17:20
用 scss 寫出一個 ie 也沒問題的 self-clear
@mixin self-clear {
clear: both;
&:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
*:first-child+html & { min-height: 1px; } // hack ie7
@maylogger
maylogger / grid.scss
Created March 16, 2011 17:45
示範如何用 scss 的 mixin 寫出一個可任意輸入數值的 grid system
@mixin grid($columns,$col-width,$gutter) {
width: ($col-width * $columns) + ($gutter * $columns);
.column {
margin: 0 $gutter $gutter 0;
float: left;
}
@for $i from 1 through $columns {
.col#{$i} {
width: ($col-width * $i) + ($gutter * ($i - 1));
}
@brendo
brendo / EventTutorial.md
Created April 4, 2011 11:06
Symphony Events: A Detailed Look

Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.

This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)

Getting Started

The Scenario

Our client requires a form that allows a user to submit some details about their new car purchase. Th

@zeuxisoo
zeuxisoo / MAMP with Python-MySQLdb.txt
Created April 13, 2011 08:56
MAMP + Python-MySQLdb
1. Goto http://dev.mysql.com/downloads/mysql/
2. Select Platform: "Mac OS X"
3. Download mysql-5.5.11-osx10.6-x86.tar.gz
(Mac OS X ver. 10.6 (x86, 32-bit), Compressed TAR Archive)
4. Unzip it
5. Copy include folder into /Applications/MAMP/Library
6. Copy lib/* files into /Applications/MAMP/Library/lib
----
1. Goto http://sourceforge.net/projects/mysql-python/
@jed
jed / LICENSE.txt
Created May 10, 2011 16:39 — forked from 140bytes/LICENSE.txt
use anchor tags to parse URLs into components
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@liuwen-lvtu
liuwen-lvtu / tutorial.mkdn
Created October 18, 2011 03:19 — forked from mirisuzanne/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@ttscoff
ttscoff / scrivwatcher.rb
Created January 25, 2012 15:05
Watch a Scrivener project for changes and update Marked.app
#!/usr/bin/ruby
# scrivwatch.rb by Brett Terpstra, 2011
# Modifications to merge into one file for Markdown viewing in Marked by BooneJS, 2012
# Modified to use REXML and add titles by Brett Terpstra, 2012 <https://gist.github.com/1676667>
#
# Watch a Scrivener project for changes and update a preview file for Marked
# Usage: scrivwatch.rb /path/to/document.scriv
# <http://markedapp.com>
require 'fileutils'
@takahashim
takahashim / mindoc-core.rnc
Created May 29, 2012 07:49
mindoc coreフォーマット定義案 (RelaxNG Compact形式)
# mindoc core (draft v0.1)
#
# mindoc(minimal document material description language)(仮)とは、文書素材を記述するための言語で、
# 一般的な書籍のための文字情報を記述するために必要最低限な要素すら網羅していない、単なる素材程度のものしか
# 記述できない・記述させない言語です。その代わり、さまざまなフォーマットへの変換・逆変換は行いやすくなって
# います(はずです。また逆変換は要素を削るので「縮退」と言った方がいいかも)。
#
# このmindoc coreは電子書籍交換フォーマットv1.1のだいたいサブセットになっています(はずです)。
# 名前空間は別にしましたが。