Skip to content

Instantly share code, notes, and snippets.


Nick Jonas nick-jonas

View GitHub Profile
nick-jonas / waves-css-anim.scss
Created Mar 27, 2014
Animating waves with CSS keyframes
View waves-css-anim.scss
@import "compass/css3/animation";
@import "compass/css3/transform";
@include keyframes(waves){
View voice-button-default.html
<voice-button cloud-speech-api-key="YOUR_API_KEY_HERE" autodetect></voice-button>
View voice-button-scalable.html
<voice-button mic-color="#230950" diameter="40"></voice-button>
<voice-button mic-color="#230950" diameter="160"></voice-button>
View voice-button-disabled.html
<voice-button mic-color="#416165" inverse></voice-button>
<voice-button mic-color="#416165" inverse disabled></voice-button>
View voice-button.html
<voice-button mic-color="#230950" inverse flat autodetect></voice-button>
nick-jonas /
Created May 12, 2017
Place this snippet in your /etc/rc.local file so an RPI will sync time on boot
#force time set with NTP server
echo Setting the time and date. Your sudo password may be required below...
sudo ntpdate -bu
echo The time and date are now set to `date`
nick-jonas / bubbles-canvas.js
Last active Oct 24, 2016
Animating bubbles using Canvas
View bubbles-canvas.js
// called once, to initialize
createBubbles: function(){
var self = this,
el = this.element,
width = $(window).width(),
height = $(window).height(),
canvas = document.createElement('canvas'); = canvas.width = width; = canvas.height = height;
nick-jonas /
Created Aug 23, 2013
Analyze sound spectrum at 30 fps, from Mr. Doob's post:
import math
import struct
import wave
import sys
w =[1], 'rb')
# We assume 44.1k @ 16-bit, can test with getframerate() and getsampwidth().
sum = 0
value = 0;
delta = 0;
nick-jonas / gist:5531169
Created May 7, 2013
.bash_profile: tab completion for SSH hostnames on ~/.ssh/config
View gist:5531169
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
nick-jonas /
Created Apr 29, 2013
Add ssh key to remote server for easy access (no typing in password). Just swap 'user' and 'server'
cat ~/.ssh/ | ssh user@server 'mkdir -p ~/.ssh; cat >> .ssh/authorized_keys'
You can’t perform that action at this time.