Skip to content

Instantly share code, notes, and snippets.

View 1dolinski's full-sized avatar

Chris Dolinski 1dolinski

View GitHub Profile
//data
"properties": {
"property1": true,
"property2": true
}
"pushid0": {
"first": "property1",
"second": "property2"
var firebase = require("firebase");
firebase.initializeApp({
serviceAccount: "./config/firebase-configs/test-app-engine-default.json",
databaseURL: "https://test.firebaseio.com"
});
var db = firebase.database();
main.js:1
(function (exports, require, module, __filename, __dirname) { import { cube, foo } from 'my-module';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
| app
-- components
-- models
-- services
main.ts
app.component.ts
| build
- build.js
- build.map.js
index.html
Short form shows in console as:
{1000: Object, 1030: Object, 1100: Object, 1130: Object, 1200: Object, 1230: Object, 1300: Object, 1330: Object, 1400: Object, 1430: Object, …}
Expanded shows as (expected):
0900: {time: 1456668000000}
0930: {time: 1456669800000}
1000: {time: 1456671600000}
1030: {time: 1456673400000}
1100: {time: 1456675200000}
1130: {time: 1456677000000}
@1dolinski
1dolinski / Tabs And Navigation: 1.0.0-beta.12.markdown
Created December 13, 2015 04:53
Tabs And Navigation: 1.0.0-beta.12
# i is a default argument
def x(i=1):
return i
# you can do this
def x(b, i=1)
return i + b
# you can't do this
@1dolinski
1dolinski / name.py
Last active December 10, 2015 23:37
class_grades=[ [85,91,89], [78,81,86],[62,75,77]]
student_grades=class_grades(int([:][0:3:]))
# int isn't needed as they are already integers
for grades in student_grades:
average=sum(student_grades)/float(len(student_grades))
user_input=input('please enter anything: ')
punctuation= "!,./\[]?><':;@)("
#for x in punc_list:
# name=name.replace(x,"")
for x in user_input:
user_input.replace(punctuation,'')
new_list=[]
@1dolinski
1dolinski / name.py
Last active December 10, 2015 19:52
#Write a program that will take an input string and will yield another (new) string
#which includes only letters andnumbers and removes all other characters
#Your program should then print both the old(input) string and the new one
#after the omissions. Think of how you can do this minimally.
#Check BIFs that can take in a character/string and decide the type of it
#Look up python String Methods (4.7.1 String Methods) in the documentation
user_input=input('please enter anything: ')
punctuation= "!,./\[]?><':;@)("
words=list(punctuation)