Skip to content

Instantly share code, notes, and snippets.

@scopevale
scopevale / index.html
Last active March 21, 2016 06:42 — forked from anonymous/index.html
JS Bin// source http://jsbin.com/nosikoj
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-0.14.7.min.js"></script>
<script src="https://fb.me/react-dom-0.14.7.min.js"></script>
<script src="https://npmcdn.com/expect/umd/expect.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.3.1/redux.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-0.14.7.min.js"></script>
<script src="https://fb.me/react-dom-0.14.7.min.js"></script>
<script src="https://npmcdn.com/expect/umd/expect.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.3.1/redux.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
@scopevale
scopevale / gist:7170e01d5327dd47105b
Created February 3, 2016 14:31 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@scopevale
scopevale / array.chunk.js
Created January 12, 2016 09:45 — forked from webinista/array.chunk.js
Array.prototype.chunk: Splits an array into an array of smaller arrays containing `groupsize` members
/*
Split an array into chunks and return an array
of these chunks.
This will *not* preserve array keys.
*/
Array.prototype.chunk = function(groupsize){
var sets = [], chunks, i = 0;
chunks = this.length / groupsize;
@scopevale
scopevale / gist:c0c05dbf5c10a7032bb4
Created January 10, 2016 15:02 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@scopevale
scopevale / index.html
Created January 7, 2016 09:39 — forked from ESeufert/index.html
A simple line chart example using D3.js
<html>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<head>
<title>D3.js Dashboard Introduction</title>
<script src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"></script>
<script>
function getMaxObjectValue(this_array, element) {
@scopevale
scopevale / commit-msg
Created December 10, 2015 13:38 — forked from jasonrobertfox/commit-msg
This is a commit-msg hook for git that will validate your commit message to conform to the rules outlined in http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html It's a ruby adaptation of the hook outlined in http://addamhardy.com/blog/2013/06/05/good-commit-messages-and-enforcing-them-with-git-hooks/ (Thanks Addam Hardy!)
#!/bin/sh
exec < /dev/tty
./.git/hooks/validate_commit.rb $1
# <subject>
# blank line (after subject)
# <body - more detailed description of commit (optional)>
# blank line (after body)
# <footer - JIRA ticket : title >
@scopevale
scopevale / .agignore
Created December 8, 2015 09:05 — forked from fallwith/.agignore
The Silver Searcher ~/.agignore file
/log/
/logs/
/images/
/javascripts/
/stylesheets/
/tmp/
/vendor/
*.sql
*.tags*
*.gemtags*
@scopevale
scopevale / gulpfile.js
Created November 15, 2015 12:19 — forked from wesbos/gulpfile.js
FAST Browserify + Reactify + Babelify
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');