I hereby claim:
- I am n0nick on github.
- I am n0nick (https://keybase.io/n0nick) on keybase.
- I have a public key whose fingerprint is F978 9870 5D9C 85EE B809 30B6 14BE 250B 5830 BDFB
To claim this, I am signing this object:
class A { | |
private foo; | |
private bar; | |
func() { | |
console.log({ | |
a: () => { console.log(this.foo); }, // this is fine | |
b() { console.log(this.bar); }, // here's the bug | |
}); | |
} |
{ | |
"singleQuote": true, | |
} |
// config/webpack/test.js | |
const environment = require('./environment'); | |
const webpackConfigWithGems = require('./utils/webpack_config_with_gems'); | |
module.exports = webpackConfigWithGems(environment); |
// config/webpack/plugins/copy_gem_assets_plugin.js | |
const copy = require('copy'); | |
const path = require('path'); | |
const { execSync } = require('child_process'); | |
const { settings } = require('../configuration.js'); | |
function CopyGemAssetsPlugin(options) { | |
this.gemsList = options.gems || []; | |
this.outPath = options.outPath || path.join('vendor', 'gems'); | |
} |
# kubectl context switcher + completion | |
function kube-context() { | |
kubectl config use-context $@ | |
} | |
_kube-context_completions() { | |
local -a options | |
options=() | |
for c in $(kubectl config view -o jsonpath='{.contexts[*].name}'); do | |
d=$(echo $c | awk 'BEGIN { FS="_" }; { printf "%11s: %-15s %-14s", $4, $3, $2 }') |
I hereby claim:
To claim this, I am signing this object:
Image: /Users/sagie/Downloads/53f770fc-4ce1-11e5-9afe-a822d4863969.png | |
Format: PNG (Portable Network Graphics) | |
Mime type: image/png | |
Class: DirectClass | |
Geometry: 200x200+0+0 | |
Units: Undefined | |
Type: TrueColor | |
Endianess: Undefined | |
Colorspace: sRGB | |
Depth: 8-bit |
# Usage: | |
# ask "What's up?" answer "ok" | |
# echo $answer | |
ask() { | |
local question=$1 | |
local default=$3 | |
local resultvar=$2 | |
echo -n "$question " |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rspec/rails' | |
class ApplicationController < ActionController::Base | |
def redirect_to_index | |
redirect_to(:action => :index) | |
end | |
end | |
describe ApplicationController, :type => :controller do |
def score(dice) | |
dice.sort.each_slice(3).inject(0) do |score, slice| | |
score + | |
if slice.count(slice.first) == 3 | |
slice[0] == 1 ? 1000 : slice[0] * 100 | |
else | |
slice.inject(0) do |slice_score, num| | |
slice_score + (num == 1 ? 100 : num == 5 ? 50 : 0) | |
end | |
end |