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 five = require("johnny-five"); | |
var board = new five.Board(); | |
function outputBinary(number, leds) { | |
var states = [ | |
number & 1, | |
number & 2, | |
number & 4 | |
]; |
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 exampleInputs = [ | |
"http://example.com/", | |
"http://example.com/#hash", | |
"http://example.com/#hash?something=hello", | |
"http://example.com/#hash?something=hello&else=hi" | |
]; | |
function getHashValueFrom(url, hashIndex, queryStringIndex) { | |
if (hashIndex === -1) { | |
return ""; |
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
# -*- mode: sh -*- | |
# ~/.bash_prompt: executed by bashrc for interactive shells. | |
DULL=0 | |
BRIGHT=1 | |
_bold=$(tput bold) | |
_normal=$(tput sgr0) | |
FG_BLACK=30 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.small div { | |
width:200px; | |
height:75px; | |
} |
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
<html> | |
<head> | |
<title>GPT Test Page</title> | |
</head> | |
<body> | |
<div id="01dff7272bfc464224240bc6f1f8d25b"></div> | |
<button id="refresh">Clear and Refresh</button> | |
<span>Times refreshed: </span><span id="times">0</span> |
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 makeBootstrappingLoader(scriptBody, clientAppUrl, isAsync) { | |
var loadAsync = isAsync ? "s.async = true;\n" : ""; | |
return "<script type=\"text/javascript\">\n" + | |
"var s = document.createElement(\"script\");\n" + | |
"s.setAttribute(\"src\", \"" + clientAppUrl + "\");\n" + | |
"document.body.insertBefore(s, null)\n"+ | |
loadAsync + | |
"function loaded(e) {\n" + | |
scriptBody + "\n" + | |
"s.removeEventListener(\"load\", loaded, false);\n" + |
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 test() {} | |
test.prototype.number = 5; | |
var a = new test | |
var b = new test | |
b.number // 5 | |
b.hasOwnProperty("number") // false <- false because number is on the prototype | |
b.number = 10 // now were assigning to number, putting it on the instance |
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
javascript:(function() {const ads = Array.from(document.querySelectorAll(".ad-wrapper")).forEach(ad => ad.parentNode.removeChild(ad));const blur = Array.from(document.querySelectorAll(".entry-content")).forEach(thing => thing.style.webkitFilter = "none");})(); |
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
" .vimrc | |
" !silent is used to suppress error messages if the config line | |
" references plugins/colorschemes that might be missing | |
" Disable Vi compatibility | |
set nocompatible | |
if has("autocmd") | |
" Load files for specific filetypes |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
OlderNewer