Skip to content

Instantly share code, notes, and snippets.

View tsongas's full-sized avatar

Chris Tsongas tsongas

  • Vercel
  • Seattle
  • 11:21 (UTC -07:00)
  • LinkedIn in/tsongas
View GitHub Profile
@tsongas
tsongas / crypto
Created February 10, 2015 18:12
Node.js crypto
var crypto = require('crypto');
crypto.randomBytes(24, function(err, buf) {
if (err) throw err;
var token = buf.toString('hex');
console.log(token);
});
@tsongas
tsongas / script.js
Created November 20, 2014 05:10
Selection Sort Example
$(document).ready(function() {
var numbers = [];
console.log(numbers);
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
@tsongas
tsongas / race3.html
Created November 18, 2014 05:06
Rabbit Game Bar Graph
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Race 3</title>
<link rel="stylesheet" href="style3.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="script3.js"></script>
</head>
<body>
### What's the name (or codename) of your app?
Pindelible
### What will your app do?
Showcase black and white nude photography
### Who's on your team? What are their roles?