Skip to content

Instantly share code, notes, and snippets.

View newswim's full-sized avatar
🦬
Hi

Dan Minshew newswim

🦬
Hi
View GitHub Profile
@newswim
newswim / typeof.js
Created December 22, 2015 20:17
typeof
typeof(typeof(typeof(typeof(typeof(typeof))))) // undefined
@newswim
newswim / install.sh
Created December 22, 2015 20:59
nativescript dump
CDaniels-MacBook-Pro:android-sdk dm$ npm i -g nativescript
npm WARN excluding symbolic link docs/stylesheets/hightlight.css -> ../../node_modules/highlight.js/src/styles/solarized_light.css
npm WARN deprecated lodash-node@2.4.1: This package is no longer maintained. See its readme for upgrade details.
npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN excluding symbolic link docs/assets/ir_black.css -> ../../node_modules/highlight.js/src/styles/ir_black.css
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN excluding symbolic link docs/stylesheets/hightlight.css -> ../../node_modules/highlight.js/src/styles/solarized_light.css
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Test Framework -> Versions/Current/Test Framework
npm WARN e
@newswim
newswim / home_page.html
Created January 13, 2016 17:09
meteor data not showing up
<template name="HomePageTemplate">
<div class="slider-container">
<div id="carousel">
{{#each sliderImages}}
<div>
<img src={{src}} alt={{alt}} width="100%" />
@newswim
newswim / BC_JAVASCRIPT.js
Created January 13, 2016 20:59
JAVASCRIPT!
0.1 + 0.2
// 0.30000000000000004
1 + 2
// 3
0.1 + 0.2 + 0.3
// 0.6000000000000001
0.1 + 0.2 + 0.3 + 0.4
// 1
0.1 + 0.2 + 0.3 + 0.4 + 0.5
// 1.5
@newswim
newswim / articles.md
Created February 8, 2016 15:08
Coding articles ++
@newswim
newswim / error.log
Created February 12, 2016 14:32
Weird memory error form Roots --watch
compiling... done!
2016-02-12 08:30:58.780 node[4632:79460] -[__NSCFNumber _fastCStringContents:]: unrecognized selector sent to instance 0x67
2016-02-12 08:30:58.783 node[4632:79460] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber _fastCStringContents:]: unrecognized selector sent to instance 0x67'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9316fae2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff984f373c objc_exception_throw + 48
2 CoreFoundation 0x00007fff93172b9d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff930ab601 ___forwarding___ + 1009
4 CoreFoundation 0x00007fff930ab188 _CF_forwarding_prep_0 + 120
@newswim
newswim / 99_bottles.sed
Created February 21, 2016 16:29
99 Bottles of Unix
/numbers/{
s/.*/99a green bottles hanging on the wall/
bl1
}
s/.*/99 green bottles hanging on the wall/
:l1
h
s/\(.*\)/c\1/
@newswim
newswim / freezer.js
Created March 2, 2016 14:22
Object.freeze() from MDN
var obj = {
prop: function() {},
foo: 'bar'
};
// New properties may be added, existing properties may be changed or removed
obj.foo = 'baz';
obj.lumpy = 'woof';
delete obj.prop;
@newswim
newswim / number.js
Created March 2, 2016 14:17
The Number object in JavaScript
/*
* The ( Number ) has many properties...
*/
Number.name
// "Number"
Number.EPSILON
// 2.220446049250313e-16
Number.MAX_SAFE_INTEGER
// 9007199254740991
@newswim
newswim / dump.sh
Created March 2, 2016 19:20
Docker build
#### Dockerfile
# Get image
FROM node:0.10.40
# Install dependencies
RUN npm i roots -g
WORKDIR /opt/app
ENTRYPOINT /usr/local/bin/roots
CMD ["compile"]