Skip to content

Instantly share code, notes, and snippets.

View xta's full-sized avatar

Rex Feng xta

View GitHub Profile
@xta
xta / gist:1558952
Created January 4, 2012 07:23
Manual DSLR Photography (Pt2 - Rex Feng)

Digital SLR photography allows you to control how light is exposed to your camera's sensor. In manual mode, you are given control of ISO, aperture, and shutter speed. The way that these three elements interact with each other produces your photograph.

ISO is the camera sensor's sensitivity to light. Lower values are less sensitive, whereas higher values are more sensitive to light. With a low ISO value (e.g. 100), your photographs will look clean (without camera grain). ISO 100 is recommended for a sunny day. With a higher ISO value (e.g. 1600), your camera will introduce undesired noise and grain. In low light settings, using a high ISO value helps you get your desired shot.

Aperture measures the amount of light that the camera lens lets through. Lower aperture values (e.g. f/1.4) correspond to more light, while higher aperture values (e.g. f/5.6) allow less light to pass through the lens. In addition to the amount of light, aperture also controls the amount of blur for out of focus areas. Lower f-numbers

@xta
xta / adding_data.sql
Created October 4, 2012 18:46 — forked from styliii/adding_data.sql
Adding Data
INSERT INTO user (id, first_name, email)
VALUES ( 0, "Josh", "jrowley@gmail.com");
INSERT INTO user (id, first_name, email)
VALUES ( 1, "Aaron", "aaron@gmail.com");
INSERT INTO user (id, first_name, email)
VALUES ( 2, "Matt", "matt@gmail.com");
INSERT INTO user (id, first_name, email)
@xta
xta / quizschema.sql
Created October 4, 2012 20:13 — forked from styliii/quizschema.sql
Setting up the Database
CREATE TABLE user (
id INTEGER PRIMARY KEY,
first_name TEXT,
email TEXT
);
CREATE TABLE quiz (
id INTEGER PRIMARY KEY,
user_id INTEGER,
name TEXT
@xta
xta / gist:3954749
Created October 25, 2012 19:08
Enumerable Ruby Methods
#For processing iterations
Array#each
Calls block once for each element in self, passing that element as a parameter.
====================================================================================
#Return array / object after iterations
Enumerable#map / Enumerable#collect
@xta
xta / seed.rake
Created November 2, 2012 20:14 — forked from aviflombaum/seed.rake
Rails Lab: Associations - seed.rake file for Songs & Artists
desc "Create a bunch of seed data for artists and songs"
task :seed_artists_and_songs => [:environment, :clear_artists_and_songs] do
# Build Song Off Artist
# Given a Song called R.E.S.P.E.C.T
# build the Aretha Franklin Artist
s = Song.create(:name => "R.E.S.P.E.C.T")
s.build_artist(:name => "Aretha Franklin")
s.save
@xta
xta / List of Programmers You Should Know About.txt
Created November 8, 2012 15:18 — forked from aviflombaum/List of Programmers You Should Know About.txt
Programmers I plan on covering at Flatiron School
matz
kent beck
roy fielding
martin fowler
tim berners lee
david heniemer hansing
john resig
jesse james garret
_why the lucky stiff
marc anderseen
@xta
xta / example.html
Created November 18, 2012 14:55 — forked from kylebarrow/example.html
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@xta
xta / OctoColor Presentation
Created November 21, 2012 00:59 — forked from davidbakertv/OctoColor Presentation
step by step commands for presentation at flatiron school 11/20/12
INSTALL & SETUP
========================
git clone git://github.com/imathis/octopress.git
cd octopress
bundle
rake install
rake preview
http://localhost:4000/
rake new_post["Hello World"]
subl .
@xta
xta / mobile tags for your '<head>'
Created November 22, 2012 05:11 — forked from chuanxshi/mobile tags for your '<head>'
mobile tags for your '<head>'
<!doctype html>
<!-- Helpful things to keep in your <head/>
// Shi Chuan, https://github.com/shichuan/mobile-html5-boilerplate
-->
<head>
<!-- consider using below meta tags if you want to disable format detection by default -->
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/>
<!-- consider using below link tag if the page is duplicate content of a desktop version -->
@xta
xta / script-bootstrap.rb
Created December 10, 2012 15:50 — forked from joakimk/script-bootstrap.rb
Bootstrap script (script/bootstrap) from a small rails project I'm working on. Designed to be quick to run when nothing changed. Intended to be used in CI builds and on dev machines.
$ time script/bootstrap
Bundler missing, installing.
Fetching: bundler-1.1.3.gem (100%)
Successfully installed bundler-1.1.3
1 gem installed
Gemfile changed, bundling.
Schema changed, updating databases.
real 0m9.163s
user 0m3.762s