Skip to content

Instantly share code, notes, and snippets.

@erictherobot
erictherobot / sonic-pi-recycled-robot-1.py
Last active August 29, 2015 14:06
Sonic Pi / Recycled Robot
# Recycled Robot #1
# Sonic Pi
loop do
play 50
sleep 0.5
play 62
sleep 0.5
end
@erictherobot
erictherobot / gist:de8a51d97af15e7da0f6
Created October 14, 2014 23:35
console.log colors
console.log('%c Look at me! ', 'background: #222; color: #bada55');

Keybase proof

I hereby claim:

  • I am erictherobot on github.
  • I am erictherobot (https://keybase.io/erictherobot) on keybase.
  • I have a public key whose fingerprint is 0355 BFDC A874 B350 F496 C4EB 95D5 16F4 C1C3 3A28

To claim this, I am signing this object:

@erictherobot
erictherobot / gist:726ff247481db11b2994
Last active August 29, 2015 14:13
Simple deploy script for my public Github organizations on Heroku
#!/bin/bash
echo "Deploying admityouhaveaproblem..."
cd ~/Heroku/admityouhaveaproblem.github.io && git push heroku master
open -a Google\ Chrome http://admityouhaveaproblem.com
echo "Deploy complete"
echo "Deploying ColorMyMusic..."
cd ~/Heroku/ColorMyMusic.github.io && git push heroku master
open -a Google\ Chrome http://colormymusic.com
@erictherobot
erictherobot / config.cson
Created January 13, 2016 16:56
Atom Editor config.cson
"*":
editor:
invisibles: {}
softWrap: true
showIndentGuide: true
softWrapAtPreferredLineLength: true
showInvisibles: true
"one-dark-ui": {}
linter: {}
"exception-reporting":
@erictherobot
erictherobot / heroku_update_build_commit_deploy.sh
Created February 11, 2016 15:07
A simple program to update, build, commit, and deploy all sites in my ~/Heroku directory on my mac
#!/bin/bash
commit_message="Updating NPM packages"
echo $commit_message
for d in ~/Heroku/*;
do
[ -d $d ] && cd "$d" && echo updating and deploying inside $d && ncu -u && grunt build && git add . && git commit -m "$commit_message" && git push origin master && echo Finished updating and deploying inside $d
done;
@erictherobot
erictherobot / gist:e74bab7f2b883e5f94d8
Created February 19, 2016 01:30
D3.js - Voronoi Diagram with Force Directed Nodes and Delaunay Links
<!DOCTYPE html>
<html>
<head>
<title>Voronoi Diagram with Force Directed Nodes and Delaunay Links</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
circle {
stroke: #EFEDF5;
fill: #EFEDF5;
<?php
$last_modified = human_time_diff( the_modified_date('U','','', false), current_time('timestamp') );
$number_of_x = preg_replace('/[^0-9]*/', '', $last_modified);
if ( strpos( $last_modified, 'min' ) || strpos( $last_modified, 'hour' ) || strpos($last_modified, 'sec' ) ) {
$wiki_date = $last_modified;
} elseif ( $number_of_x > 365 ) {
$wiki_date = __( 'a long time' );
} elseif ( $number_of_x >= 180 ) {
$wiki_date = __( 'less than a year' );
} elseif ( $number_of_x >= 60 ) {
@erictherobot
erictherobot / is_jquery_loaded.js
Created May 10, 2016 17:46
is jQuery loaded?
// just a simple snippet to paste into your console to determine if jQuery is loaded
if (jQuery)
console.dir("jQuery "+$().jquery +" loaded");
else
console.dir("jQuery NOT loaded");
if($.ui)
console.dir("jQuery UI "+$.ui.version+" loaded");
else

Keybase proof

I hereby claim:

  • I am erictherobot on github.
  • I am erictherobot (https://keybase.io/erictherobot) on keybase.
  • I have a public key whose fingerprint is 5C2C 5100 4C9A BED6 54A3 4954 A5AE 702E 0F50 F8BD

To claim this, I am signing this object: