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 colorama as color | |
from os import path | |
import pytest | |
from _pytest.terminal import TerminalReporter | |
PASSED = 0 | |
FAILED = 2 | |
OTHER = 1 | |
COLORS = {PASSED: "GREEN", |
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
#include <iostream> | |
#include <vector> | |
#include <functional> | |
#define var auto | |
#define in : | |
#define lambda(...) [](__VA_ARGS__) | |
#define print(X) std::cout<<X<<std::endl | |
#define def(TYPE, FUNC, ...) auto FUNC(__VA_ARGS__) -> TYPE | |
/* |
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
/* | |
sheep.js | |
Turn your beautiful style sheep into CSS style sheets with ease! | |
*/ | |
(function (globals) { | |
var forEachDOM = function (selector, callback) { | |
Array.prototype.forEach.call(document.querySelectorAll(selector), callback); | |
}; |
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
# Show all commits of current branch since its beginning | |
# Add flags as though it were git log | |
git log $(git parent)..HEAD $* |
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
interface Shouter | |
fun shout(env: Env) | |
class Person | |
let name: String | |
var age: U8 | |
new create(name': String, age':U8) => | |
name = name' | |
age = age' |
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
from pluginable import Pluginable | |
class MyClass(Pluginable): | |
pass |
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
function functionToBlob(func) { | |
return new Blob([`(${func.toString()})()`]); | |
} | |
function importAsBlob(func) { | |
return new Blob([`var ${func.name} = ${func.toString()}`]); | |
} | |
function getFunctionUrl(func, imported) { | |
return URL.createObjectURL((imported ? importAsBlob : functionToBlob)(func)); |
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
// using ES5, but still relevant | |
var map = { | |
a: 1, | |
b: 2 | |
}; | |
Object.prototype.thisIsReallyReallyPrivate = 'foo' | |
for (var key in map) { | |
console.log(key); |
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
function exporter(publics, privates) { | |
privates = privates || {}; | |
var all = Object.assign({}, publics, privates); | |
publics.__test = function (t) { | |
var str = t.toString().match(/\{((.|\s)*)\}/)[1]; | |
with (all) { | |
eval(str); | |
} | |
}; | |
return publics; |
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 ArgParse | |
import Dice.IO | |
import Dice.Pure | |
handleOptions :: Option -> IO () | |
handleOptions (Level level) = rollAgainst level >>= (\result -> putStrLn $ rollMessage result) | |
main = do | |
argparse handleOptions |
OlderNewer