Skip to content

Instantly share code, notes, and snippets.

(function() {
try {
var a = new Uint8Array(1);
return; //no need
} catch(e) { }
function subarray(start, end) {
return this.slice(start, end);
}
diff --git a/public/javascripts/custom/application.js b/public/javascripts/custom/application.js
index 6d55e23..51fd890 100644
--- a/public/javascripts/custom/application.js
+++ b/public/javascripts/custom/application.js
@@ -4,3 +4,8 @@ window.App = Ember.Application.create({
}
});
+App.FunView = Ember.View.extend({
+ templateName: 'fun',
$( document ).on( "click", ".term", function( e ) {
$( "input" ).val( $( this ).text() );
$( "button" ).trigger( "click" );
});
$( "button" ).on( "click", function( e ) {
var searchTerm = $( "input" ).val(),
url = "http://odata.netflix.com/Catalog/Titles?$filter=substringof('" +
escape( searchTerm ) + "',Name)&$callback=callback&$format=json";
{
"name": "app",
"version": "0.0.1",
"dependencies": {
"serveup": "~0.0.2",
"hem": "~0.1.6",
"es5-shimify": "~0.0.1",
"json2ify": "~0.0.1",
"jqueryify": "~0.0.1",
"spine": "~1.0.5",
# Put this in ~/.zshrc
chpwd() {
if [ -f ".env" ]; then source .env; fi
}
# Then make .env files in your project directories that look like this.
export S3_SECRET="<s3_secret>"
export S3_KEY="<s3_key>"
# Then add .env to ~/.gitignore
# Bicycle example for bdw / intro to programming class week 3, basics of methods.
# I'm a method without variables
def ride
"OK, we're rolling..."
end
# I'm a method with variables
def gear_ratio(gearing)
(gearing[:front_chainring_gear].to_f / gearing[:rear_chainring_gear].to_f).round(2)
@bertomartin
bertomartin / .slate
Created March 18, 2013 17:58 — forked from bsag/.slate
# My slate file
# 10-02-2013
# Basic mappings and bindings for moving screens around
# I have set up my right command key to trigger ctrl+alt+shift+cmd
# see http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#hyper for details
config defaultToCurrentScreen true
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
/*** GLOBAL ***/
/**************/
img, embed, object, video {
max-width: 100%;
}
@font-face {
font-family: 'sicanstudios-icons';
src:url('./fonts/sicanstudios-icons.eot');
}
def nested_keys(h)
th = {"keys" => h.keys.sort}
h.each{|k,v| th[k] = nested_keys(h[k]) if h[k].class == Hash }
th
end
nested_keys(h1).diff(nested_keys(h2))

technical blogging

lessons learned getting started

develop a formula

  • meta/method vs content:
    • When I read articles, I don't just want results. I want to learn how to do things myself--reusable stuff.
    • Try to orient small things in context of bigger things.
      • Even if this isn't done explicitly, point of view & meta stuff can still be picked up by your readers.
  • THinking in terms of a bigger picture helps to find gaps in discussion or explanation of specific examples