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 d(f, h) { | |
h = h || 0.001; | |
return function (x) { | |
return (f(x+h)-f(x))/h; | |
} | |
} | |
function S(f, h) { | |
h = h || 0.001; |
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
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nec mauris tellus. | |
Sed vel sollicitudin est. Nunc blandit odio et augue faucibus in pulvinar sem | |
aliquet. Suspendisse lorem tellus, ultricies sed interdum eget, fermentum nec | |
lorem. Sed volutpat mauris vitae eros pretium cursus. Phasellus sit amet felis id | |
urna rhoncus dapibus. Quisque varius est ac neque dictum ac facilisis massa aliquet. | |
Aenean commodo dolor a sem ullamcorper iaculis. Vivamus ultrices consectetur massa, | |
eget feugiat libero auctor nec. Cras eget massa vitae lacus facilisis fermentum. | |
Curabitur at enim non nisl laoreet mattis. Nulla facilisi. | |
Mauris gravida erat ornare mi fringilla interdum. Vivamus adipiscing dignissim |
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 http = require('http'); | |
var hitCnt = 0; | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
hitCnt++; | |
console.log('Server 1: ' + hitCnt); | |
res.end('Server 1: ' + hitCnt + '\n'); | |
}).listen(8124, "127.0.0.1"); | |
console.log('Server running at http://127.0.0.1:8124/'); |
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 http = require('http'); | |
var hitCnt = 0; | |
http.createServer(function (req, res) { | |
// myHitCnt is function scope, but the function is | |
// a callback and only exists with each req | |
var myHitCnt = 0; | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
hitCnt++; myHitCnt++; | |
console.log('Server 1: ' + hitCnt + ' / my: ' + myHitCnt); |
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
#!/usr/bin/env ruby -w | |
# | |
# IT'S SNOWING! xo, hdh. | |
require 'curses' | |
include Curses | |
class Snow | |
def initialize | |
draw |
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
#!/usr/bin/env ruby -w | |
# | |
# IT'S SNOWING! xo, hdh. | |
require 'curses' | |
include Curses | |
class Snow | |
def initialize | |
draw |
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
CAT_LEFT1 = <<-'CAT_LEFT1' | |
_ | |
| \ | |
| | | |
| | | |
|\ | | | |
/, ~\ / / | |
X `-.....-------./ / | |
~-. ~ ~ | | |
\ / | |
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
#!/bin/bash | |
PARTY_DIR=subpop_cascadia | |
command -v curl || (echo "No curl in path." && exit 1) | |
mkdir -p $PARTY_DIR | |
cd $PARTY_DIR | |
curl -O https://s3.amazonaws.com/subpop-public/assets/audio/JAMIFEST.txt |
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
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rails/test_help' | |
require 'minitest/autorun' | |
require 'ministat' | |
require 'json' | |
module Sprouting | |
class TestCase < MiniTest::Unit::TestCase | |
include ActiveSupport::Testing::SetupAndTeardown |
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 lang="en"> | |
<head><title>JS DOM Animation Example</title></head> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} |
OlderNewer