Object.create(null)
is one way- Using
Maps
lets you store properties that might collide with JS built-ins: new Map([['name', 'Jean-Luc Picard']])
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
<%= fileHeader({file, commentStyle: 'long'}) %> | |
<% variableTokens.forEach(({name, value}) => { %> | |
$<%= name %>-color: <%= value %>;<% }); %> | |
<% Object.entries(compositionCssRules).forEach(([name, rules]) => { %> | |
%<%= name %> {<% rules.forEach(({rule, value}) => { %> | |
<%= rule %>: <%= value %>;<% }) %> | |
} | |
<% }) % |
I hereby claim:
- I am mynnx on github.
- I am mynnx (https://keybase.io/mynnx) on keybase.
- I have a public key whose fingerprint is 47A6 130B 68A1 4381 8764 2665 D6DD 69F0 C282 F200
To claim this, I am signing this object:
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
$ ./scripts/ci/build | |
npm WARN deprecated yarn@0.18.1: It is recommended to install Yarn using the native installation method for your environment. See https://yarnpkg.com/en/docs/install | |
/opt/local/nvm/versions/node/v6.9.1/bin/yarn -> /opt/local/nvm/versions/node/v6.9.1/lib/node_modules/yarn/bin/yarn.js | |
/opt/local/nvm/versions/node/v6.9.1/bin/yarnpkg -> /opt/local/nvm/versions/node/v6.9.1/lib/node_modules/yarn/bin/yarn.js | |
> spawn-sync@1.0.15 postinstall /opt/local/nvm/versions/node/v6.9.1/lib/node_modules/yarn/node_modules/spawn-sync | |
> node postinstall | |
/opt/local/nvm/versions/node/v6.9.1/lib | |
└─┬ yarn@0.18.1 |
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
import flask | |
from time import sleep | |
import redis | |
from flask import Flask, request | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
app = Flask(__name__) | |
class Robot(object): |
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
(master) $ node get-sms.js | |
{ code: 100, | |
message: 'UNKNOWN_FORMAT', | |
details: | |
{ res: | |
{ _readableState: [Object], | |
readable: false, | |
domain: null, | |
_events: [Object], | |
_maxListeners: 10, |
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
vagrant@reach:~$ sudo apt-get install python-mysqldb | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
Some packages could not be installed. This may mean that you have | |
requested an impossible situation or if you are using the unstable | |
distribution that some required packages have not yet been created | |
or been moved out of Incoming. | |
The following information may help to resolve the situation: |
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
Jumping into debugger for post-mortem of exception ''NoneType' object has no attribute 'hash_key'': | |
> /data/ck/cloudkick/webapp/inventory/models.py(1105)provider_with_creds() | |
-> return self.get_query_set().filter(api_key_uniq=pcreds.hash_key, | |
(Pdb) bt | |
/usr/lib/python2.6/dist-packages/twisted/python/threadpool.py(210)_worker() | |
-> result = context.call(ctx, function, *args, **kwargs) | |
/usr/lib/python2.6/dist-packages/twisted/python/context.py(59)callWithContext() | |
-> return self.currentContext().callWithContext(ctx, func, *args, **kw) | |
/usr/lib/python2.6/dist-packages/twisted/python/context.py(37)callWithContext() | |
-> return func(*args,**kw) |
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
test_lb = [b for b in balancers if b.name == 'Mark - T1'][0] | |
updated_balancer = conn.update_balancer(test_lb, | |
name='Mark - T2', | |
protocol='HTTPS', | |
port=84, | |
algorithm=Algorithm.ROUND_ROBIN) | |
import time | |
start = time.time() | |
while updated_balancer.state != State.RUNNING: |
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 Soda: | |
ITALIAN_BUBBLY_STUFF_IN_A_GLASS_BOTTLE = 'crap' | |
KROGER_BRAND_SODA = 'also crap' | |
class Pepsi: | |
MOUNTAIN_DEW = 'awesome' |