Skip to content

Instantly share code, notes, and snippets.

static e_STATE current_state;
void main_thread()
{
switch(current_state)
{
case STATE_A:
state_a();
break;
...
<?php
$my_post = get_post($my_id = 12);
echo $my_post->post_title;
echo $my_post->post_content;
?>
hazards = Hazard.find :all
states = State.find :all
for hazard in hazards
for state in states
sorted_mats = Array.new
total_storage = 0.0000
total_closed = 0.0000
total_open = 0.0000
for proj_mat in @project.project_materials
# My version of an app template, modified by James Cox (imajes)
# SUPER DARING APP TEMPLATE 1.0 - By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/src/git/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"