This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = 10 | |
y = 30 | |
def change(x): | |
x = 11 | |
return x | |
print change(x), x | |
def change_global(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import tweepy | |
CONSUMER_KEY = "..." | |
CONSUMER_SECRET ="..." | |
ACCESS_KEY = "..." | |
ACCESS_SECRET = "..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Hapi = require("hapi"); | |
var Joi = require("joi"); | |
var server = new Hapi.Server(8080, "localhost", { | |
cache: { | |
engine: "catbox-redis", | |
options: { | |
host: "localhost", | |
port: 8080, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
park_features = {} | |
ParkFeature.where(park_id: @park.id).map{|ft| park_features[ft.feature_id] = Feature.where(id: ft.feature_id).select('id, title, icon')} | |
@features = park_features.values() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ParkFeature < ActiveRecord::Base | |
self.table_name = 'parks_features' | |
belongs_to :park | |
belongs_to :feature | |
end | |
class Feature < ActiveRecord::Base | |
has_many :park_features | |
has_many :parks, through: :park_features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = { | |
filters: { | |
filterOne: [ | |
{}, | |
{}, | |
], | |
filterTwo: [...] | |
} | |
}, | |
otherkey: "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var _ = require('underscore'); | |
// Init | |
var sidebarOpen = false; | |
// TODO Enable Static Assets to go to other Views besides SideBar | |
function buildStaticAssets(modules){ | |
// Init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var _ = require('underscore'); | |
// Init | |
var sidebarOpen = false; | |
// TODO Enable Static Assets to go to other Views besides SideBar | |
function buildStaticAssets(modules){ | |
// Init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Places Model | |
Class Places | |
# I added through Houses, removed depdendent: :destroy (see comment) | |
has_many :campsites, dependent: :destroy | |
#has_many :days, dependent: :destroy | |
has_many :days, through: :houses | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:16 ~/src/beaglelabs/beagle $ npm ls | |
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/gulp-react requires react-tools@'^0.11.2' but will load | |
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/react-tools, | |
npm WARN unmet dependency which is version 0.12.1 | |
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/browserify/node_modules/crypto-browserify/node_modules/sha.js requires buffer@'~2.3.2' but will load | |
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/browserify/node_modules/buffer, | |
npm WARN unmet dependency which is version 2.8.1 | |
beagle@0.0.0 /Users/richard/src/beaglelabs/beagle | |
├─┬ beagle-altmetrics@0.0.2 -> /Users/richard/src/beaglelabs/beagle-altmetrics | |
│ ├─┬ accum-transform@1.0.2 |
OlderNewer