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
const basket = [ | |
{ name:"apple", type: "fruit", calories: 52 }, | |
{ name:"broccoli", type: "vegetable", calories: 45 }, | |
{ name:"banana", type: "fruit", calories: 89 } | |
]; | |
class CaloriesAccumulator { | |
constructor(fruitCount = 0, avgCalories = 0) { | |
console.debug(`count: ${fruitCount}\tavg: ${avgCalories}`) | |
this.fruitCount = fruitCount |
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
# Step 0 -- create test data | |
redis-cli HSET :object:30343552:data foo bar | |
# Step 1 -- store sample function 'sampleFunction' | |
redis-cli SET :functions:sample1 " | |
redis.call('SELECT', 0); | |
local data = redis.call('HGETALL', ':object:' .. ARGV[1] .. ':data'); | |
return table.concat(data, '+'); | |
" |
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
if [ -f /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash ]; then | |
. /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
fi | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
# configuration variables as documented in: | |
# https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh#L8 | |
# | |
GIT_PS1_SHOWDIRTYSTATE="yes" |
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 FooPrototype = { | |
methodA: function methodA() {}, | |
methodB: function methodB() {}, | |
methodC: function methodC() {} | |
}; | |
exports.createFoo = function() { | |
return Object.create(FooPrototype); | |
}; |