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
Hello, World! | |
<a | |
data-ng-click="main.currentView = 'views/other.html'" | |
href="#" | |
> | |
Testing | |
</a> | |
// |
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
// import importedTrait from 'modules/importedTrait'; | |
const importedTrait = Trait({ | |
direction() { | |
return this.colours; | |
} | |
}); | |
const gameThingTrait = Trait({ | |
// gps: 1337, | |
render() { | |
this.fun += 1; |
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
import action from "./controller"; | |
router.get("/:user/status/", authenticate, function(request, response) { | |
const user = request.params.user; | |
action(user) | |
.then(value => response.json(value)) | |
.catch(reason => response.json({ data: reason, status: 500 })); | |
}); | |
function authenticate(request, response, 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
'use strict'; | |
const defaultHost = 'localhost'; | |
const defaultPort = 9229; | |
const defaultPoll = false; | |
const launchDefaults = false; | |
const notificationId = 'pollForDevTools'; | |
const interval = 500; | |
let openedInspectorTab = null; | |
let notificationActive = false; |
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
<h1>intalg</h1> | |
<script src="node_modules/intalg/dist/intalg.min.js"></script> | |
<script> | |
const intervals = [ | |
{ | |
begin: 19, | |
end: 31, | |
type: 'rent' | |
} | |
] |
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 flatten = function flatten(array) { | |
const flattened = array.reduce( | |
function reducer(reduced, arrayItem) { | |
const arrayItemIsArray = Array.isArray(arrayItem); | |
if (arrayItemIsArray) return reduced.concat(flatten(arrayItem)); |
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 makeG = n => x => (x ** 2 + 1) % n; | |
const gcd = (a, b) => (b === 0 ? a : gcd(b, a % b)); | |
const pollard = n => { | |
const g = makeG(n); | |
let x = 1; | |
let y = 2; |
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
let context = {}; | |
context.createContext = function (fn) { | |
let name = "context" + Math.floor(Math.random() * 10000000); | |
Object.defineProperty(fn, "name", {value: name}); | |
let params = {}; | |
global[name] = params; | |
fn(params); | |
delete global[name]; | |
}; |
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
import Mocha from "mocha" | |
export default new Mocha() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |