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 traverse(obj) { | |
var stack = []; | |
var i = 0; | |
stack.push(obj); | |
while (stack.length) { | |
for (var j in stack[0]) { | |
i++; | |
if (typeof stack[0][j] === 'object') { |
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 that returns a promise | |
function getAMessage() { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve("passing this value back..."); | |
}, 2000); | |
}); | |
} | |
// function is marked async |
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
0x683A802cB2346CB769dd0E3D7FaCcf08d1073fBE |
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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Scanner; | |
public class ExampleMultipleStringsToList { | |
public static void main(String[] args) { | |
// read in a line | |
Scanner scanner = new Scanner(System.in); |
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
// assume some stuff like this exists | |
ArrayList<String> lines = ... | |
BufferedWriter writer = ... | |
// get your iterator instance. | |
Iterator<String> iterator = lines.iterator(); | |
String write = null; | |
// iterate + check inside of the while loop condition test. | |
while (iterator.hasNext() && (write = iterator.next()) != null) { |
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>Canvas Boilerplate</title> | |
<style type="text/css"> | |
*,html{ | |
margin: 0;padding: 0; | |
} | |
canvas { | |
width: 100%; |
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> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/core-min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/hmac-sha1.js"></script> | |
</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
# cassandra runs on 9042 for devCenter management | |
# expose it (9999 locally) running on a remote server locally: | |
ssh -L 9999:localhost:9042 -f -N remoteuser@remotehost |
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
<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36" version="5.5.2.3" editor="www.draw.io" type="device"><diagram>7Vrrb9s2EP9rjHUfUsiSX/mYpG02YAGKZUPWTwMt0RJnSlQpuY771/eOD5l6zYmtpG0QG7al04mPux9/d0d5FFyl99eS5MmNiCgf+V50PwrejXx/PAkm8IOSnZEs5kYSSxYZ2V5wy75SI/SMdMMiWtQUSyF4yfK6MBRZRsOyJiNSim1dbSV4vdecxLbHveA2JLwtvWNRmWjpwp/t5b9RFie25/HsXF9ZknAdS7HJTH8jP1ipl76cEtuWmWiRkEhsHVHwHgwrhYCW8Si9v6IcjWvNpu/70HO1GrekmRnbgRvsOMqdnTuNwBTmVMgyEbHICH+/l16q+VFswYOzpEw5HI7hEDqVu39Q/tYbV4JPSjBdwPl/tCx3xt1kUwoQ7bv4Q4jcbegjlSylJZWmIz1SHF7vZI2oEBsZGi04V/AhMqZGS2HR2OOaCuhD7kBFUk5K9qXeOjFIiis9c+uFlATvsgq5YFlZOC1/RAEo2FUxm+oWzZoImp5p6M+sa47VnxzQtzPs1ocDPUN75phqL1Jo6kGW9cUgyHoUcDQCpy7+8Npg+FkMgZ82QOZ1B46n5tw2oYdg7tp7qh+Iji8f7T01x+F5ocEJj/DsYN4bKxI/wX01s/6PDU3fXwjfmEY/wchAckeX8P0RY1DTyBAPcjzMpQhpAZ1fbhNW0tucqBltId7WTZtzwrKzJXahe6OypBZRPSZqz93eYMNSFbfN+XYfBM+NKKnFvwZUjzKX4cfnJYzjYBU8CQNMvB7zH2CAI9a3mkANm9dCxGBS37viYhPB7w3gj8Qsi+H4zfXVza9t93AOCRm6wcI2VPc+ELSxpDQbALXTo |
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
becomemulder() { | |
export GIT_AUTHOR_NAME="Special Agent Fox Mulder" | |
export GIT_AUTHOR_EMAIL="fmulder@fbi.gov" | |
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" | |
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" | |
} | |
becomeaaron() { | |
export GIT_AUTHOR_NAME="Aaron Decker" |