Skip to content

Instantly share code, notes, and snippets.

View bigmoves's full-sized avatar

Chad Miller bigmoves

View GitHub Profile
function toRoman(n) {
var r = '',
decimals = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
roman = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];
for (var i = 0; i < decimals.length; i++) {
while (n >= decimals[i]) {
r += roman[i];
n -= decimals[i];
}
}
@bigmoves
bigmoves / app.js
Created July 22, 2014 15:46
Angular Tutorial @ OSCON
angular.module('musicPlayer', [])
.controller('PlaylistCtrl', function($scope, $filter, $http) {
$scope.currentSong = "";
$scope.playlistName = "";
$scope.playlist = [];
$scope.savedPlaylists = [];
$scope.currentPlaylist = {};
$scope.playlistSearch = "";
@bigmoves
bigmoves / notes.md
Last active August 29, 2015 14:04
Git Tutorial @ OSCON
git --prune

cleans up remote and local branches

git branch -a

list all local and remote branches

@bigmoves
bigmoves / app.js
Created July 22, 2014 15:54
React.js Playlist Component http://jsbin.com/xoxapako/3/edit
/** @jsx React.DOM */
var Playlist = React.createClass({
getInitialState: function() {
return {
playlist: [],
savedPlaylists: [],
currentSong: 'black hole sun',
playlistName: '',
currentPlaylist: null,
@bigmoves
bigmoves / todos.json
Created October 25, 2018 21:43
Todos
[{ "label": "Turn in ballot" }, { "label": "Pick up package at Post Office" }]