Skip to content

Instantly share code, notes, and snippets.

How do I start a project?
You'll need to log in with your GitHub account. Then go to the project page you want to start and click 'i want to work on this'.
How do I say I've completed a feature?
Once you've started work on a project, click the "I've done this" button on the feature you've done.
How do I know when I've completed a feature?
Read the specification for each feature carefully. Does your code do everything that is required? If it does, and you're happy with the code you've written, then the feature is done.
I've finished this project - now what do I do?
Start a new project! :)
I started this project but I don't want to continue. What should I do?
Do I need to test what I've done?
export VISUAL="`which subl` -w"
export EDITOR=subl
export PS1="\[\033[0;31m\]\u@\h:\[\033[0;37m\]\w\[\033[0;35m\]\$(__git_ps1 ' %s')\[\033[0m\] $ "
Code:
Lines of a program or script. Often used casually to refer to an entire program or application.
Program:
A program is a piece of software that must be compiled before it can be run, but in casual language, it is often used interchangeably with 'script'.
Script:
A script is a piece of software that can be run without being compiled, but in casual language, it is often used interchangeably with 'program'.
Application:
A stand-alone piece of software, such as Microsoft Office or Firefox.
Web application / webapp:
A website that offers rich features associated with desktop applications, such as Facebook or Google Drive.
@malpinder
malpinder / Ruby Syntax cheat sheet
Last active August 29, 2015 13:57
Cheat sheet for ruby syntax
# Comments start with a hash symbol.
# Casing rules:
variables_all_go_in_snake_case
method_names_in_snake_case_too
CONSTANTS_ARE_IN_SCREAMING_SNAKE_CASE
# Basic objects:
strings_have_single_quotes = 'A string'
strings_have_double_quotes_too = "A different string"
@malpinder
malpinder / adventure.rb
Created March 18, 2014 11:07
Refactoring excercise. Make this thrashing leviathan of code into something a bit more understandable, before it devours us all.
# I'm so, so sorry.
class Adventure
def run
@location = :north
puts "You are in a maze of twisty little passages, all alike"
puts "What do you do?"
result = gets.chomp
@malpinder
malpinder / adventure.rb
Created March 19, 2014 18:17
Refactoring excercise. A version of adventure.rb that has been refactored to a degree.
# I'm less sorry but still a bit sorry.
class Adventure
def rooms
{
room_one: "You are in a maze of twisty little passages, all alike",
room_two: "It is dark here. You are likely to be eaten by a grue.",
room_three: "It is dark here."
}
@malpinder
malpinder / module_cheatsheet.rb
Created March 20, 2014 09:01
Modules cheatsheet
# Modules can be used for namespacing...
module Whizz
class SoundEffect
def noise
"Whizzo!"
end
end
class Popper
@malpinder
malpinder / moon.rb
Created March 24, 2014 12:56
A more readable version of Aaron Patterson's moon tweet. https://twitter.com/tenderlove/status/435590528025899008
moon_id=0x1F311
loop do
8.times do |i|
delete = ("\b"*6)
moon = [moon_id+i].pack("U")
spaces = (" "*5)
line = delete + moon + spaces
print(line)
sleep(0.1)
end
@malpinder
malpinder / cheats.txt
Created April 2, 2014 17:01
SQL cheatsheet
Basic select:
SELECT * FROM users;
Selecting only some columns:
SELECT id, name FROM users;
Aliasing columns:
@malpinder
malpinder / Gemfile
Created April 15, 2014 09:51
Example modular Sinatra app
source 'https://rubygems.org'
gem 'totally_cool_art', git: "https://github.com/shjohnson/TotallyCoolArt"
gem 'sinatra'
group :test, :development do
gem 'rspec'
end