This file contains hidden or 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 x = true || false, y = 1, z = 2; | |
function () { | |
return x ? y : z; | |
} | |
function () { | |
if (x) { | |
return y; | |
} |
This file contains hidden or 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
#! /usr/bin/env bash | |
set -e | |
( | |
__DIR="$PWD" | |
while [ "$__DIR" != "/" ] && [ ! -e "${__DIR}/docker-compose.yml" ]; do | |
__DIR=`dirname "$__DIR"` | |
done | |
cd "$__DIR" | |
docker-compose $* |
This file contains hidden or 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
module.exports = { | |
users: [ | |
{"name": "first_test_user", "password": "this_is_ofc_a_hash_with_salt_etc"} | |
], | |
products: [ | |
{"name": "awesome product (tm)", "id": "very unique id"} | |
] | |
} |
This file contains hidden or 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
(function (patched) { | |
if (!patched) { | |
window.patched = true; | |
console.log("patched") | |
} | |
})(patched) |
This file contains hidden or 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
(function(){ | |
var log = console.log; | |
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;'; | |
function gen_css(){ | |
return css + "font-size: " + (9 + ((Math.random() * 20) << 0)) + "px;" | |
} | |
console.log = function(str) { | |
var args = Array.prototype.slice.call(arguments); |
This file contains hidden or 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
{ | |
"private": true | |
, "name": "mtp" | |
, "description": "My test project" | |
, "dependencies": { | |
"cucumber": "*" | |
} | |
} |
This file contains hidden or 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
echo $BASH_SOURCE |
This file contains hidden or 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
def check(number): | |
pass | |
def run_tests(): | |
assert check(1) == 1, "one is not devicible with 3 or 5 so leave it alone" | |
if __name__ == "__main__": | |
run_tests() |
This file contains hidden or 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
window.Models = EM.Namespace.create(); | |
DS.RESTAdapter.map('Models.model', { | |
primaryKey: 'idx' | |
}) | |
Models.model = DS.Model.extend({ | |
init: function () { | |
this.super(); | |
Em.run.next({ |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
>>> update_item(Item("a", 1, 2)) | |
a, 0, 1 | |
>>> update_item(Item("a", 1, 1)) | |
a, 0, 0 | |
>>> update_item(Item("a", 1, 0)) | |
a, 0, 0 | |
>>> update_item(Item("a", 0, 3)) | |
a, -1, 1 |
NewerOlder