Skip to content

Instantly share code, notes, and snippets.

View sc2stats.txt
[ Zerg Structures ]
Hatchery | morph : 300 0 100 : Drone | prov_f : 2
Extractor | morph : 25 0 30 : Drone
Spawning Pool | morph : 200 0 65 : Drone : Hatchery
Evolution Chamber | morph : 75 0 35 : Drone : Hatchery
Spine Crawler | morph : 100 0 50 : Drone : Spawning Pool
Roach Warren | morph : 150 0 55 : Drone : Spawning Pool
Baneling Nest | morph : 100 50 60 : Drone : Spawning Pool
Spore Crawler | morph : 75 0 30 : Drone : Evolution Chamber
View application_controller.rb
class ApplicationController < ActionController::Base
include UrlHelper, ApplicationHelper
before_filter :set_cookie
private
def set_cookie
@naomik
naomik / another_file.yml
Created May 23, 2011
Hello, Allan Odgaard
View another_file.yml
config:
foo: bar
hello: world
View Gemfile
# Gemfile
source :rubygems
gem "rspec"
View pacients_helper.rb
module PacientsHelper
def link_to_analize(pacient)
path = case pacient.last_protocol.program
when 'capd' then new_pacient_capd_url(pacient)
when 'hd' then new_pacient_hemo_lunar_url(pacient)
when 'brd' then new_pacient_bcr_path(pacient)
end
link_to('Adauga alt set de analize', path)
end
@naomik
naomik / mysql.php
Created Jun 20, 2011
sample mysql convenience methods
View mysql.php
<?php
class Mysql {
static public function query(){
$args = func_get_args();
return mysql_query(call_user_func_array(array("self", "queryf"), $args));
}
static public function queryf(){
@naomik
naomik / love.coffee
Created Jun 28, 2011
learning coffee script
View love.coffee
sys = require "sys"
class Lover
@count = 0
constructor: (name) ->
@setName name
Lover.count++
setName: (name) ->
@naomik
naomik / iso.sh
Created Jul 21, 2011
How to create ISO in OSX
View iso.sh
# convert dmg to iso
hdiutil convert discimage.dmg -format UDTO -o output.iso
# if that doesn't work
hdiutil convert original.dmg -format UDTO -o newisoimage.cdr
# rename to .iso when done
# perhaps better: convert cdr to iso
hdiutil makehybrid -iso -joliet -o test.iso test.cdr
@naomik
naomik / SBG6580.md
Created Jul 22, 2011
How to use SBG6580 in "Bridged" mode
View SBG6580.md

How to use SBG6580 in "Bridged" mode

###Software version at time of writing: 3.2.1.0-GA-06-007-NOSH ###Standard Specification Compliant: DOCSIS 3.0

  1. unplug coax from modem
  2. hold down reset button on modem until it restarts
  3. connect computer to modem via ethernet cable
  4. go to http://192.168.0.1 and login with admin/motorola
  5. Wireless => Primary Network => Disable
  6. Advanced => NAPT Mode => Disable (this is cause modem to restart)
View colby.sql
-- shifts table
create table shifts (
id int unsigned not null auto_increment primary key,
name varchar(50) default null,
start_time time default null,
end_time time default null
);
-- parts table
You can’t perform that action at this time.