Skip to content

Instantly share code, notes, and snippets.

View jccrosby's full-sized avatar
🏠
Working from home

John Crosby jccrosby

🏠
Working from home
View GitHub Profile
@jccrosby
jccrosby / getting-comfortable-expression.html
Last active January 2, 2016 23:49
AngularJS expression
<p>3 x 3 = {{3 * 3}}</p>
@jccrosby
jccrosby / getting-comfortable-controller.html
Last active January 2, 2016 23:49
Adding an AngularJS controller
<div ng-controller="SliderCtrl">
<div id="slider01"></div>
<div id="view">
<h1>I'm The View</h1>
<img id="image01" src="images/view-two.jpg" alt="View">
</div>
</div>
<script>
function SliderCtrl($scope) {
var DEFAULT_WIDTH = 500;
@jccrosby
jccrosby / getting-comfortable-data-binding.html
Last active January 2, 2016 23:49
Example AngularJS for data binding
<h1>Hello, {{helloName}}!</h1>
<input type="text" name="name" placeholder="Your name here..." ng-model="helloName">
@jccrosby
jccrosby / getting-comfortable-directive.html
Created January 12, 2014 00:18
AngularJS example of a directive.
<div ng-app="SliderApp">
<div ng-controller="SliderCtrl">
<scale-slider id="imageScaler" min="0" max="100" step="1"></scale-slider>
<div id="view">
<h1>I'm The View</h1>
<img id="image" ng-style="sliderStyle()" src="images/view-two.jpg" alt="View">
</div>
</div>
@jccrosby
jccrosby / bower_npm_install.sh
Created July 29, 2015 16:02
Bower & npm install for sub-directories
for d in ./*/ ; do (cd "$d" && bower install && npm install;); done
@jccrosby
jccrosby / git_fetch_pull_all_subfolders.sh
Last active August 29, 2015 14:27 — forked from mnem/git_fetch_pull_all_subfolders.sh
Simple bash script for fetching and pulling all repos in the executed folder to the latest of the branch they are on
#!/bin/bash
################
# Uncomment if you want the script to always use the scripts
# directory as the folder to look through
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPOSITORIES=`pwd`
IFS=$'\n'
@jccrosby
jccrosby / bash_history.sh
Created September 3, 2015 14:27
Just put that in .bashrc. Replaces ~/.bash_history with ~/.history/<year>/<month>/<session>
HISTFILE="${HOME}/.history/$(date -u +%Y/%m/%d.%H.%M.%S)_${HOSTNAME_SHORT}_$$"
@jccrosby
jccrosby / SpecRunner.js
Last active April 15, 2016 21:00 — forked from michaelcox/SpecRunner.js
Browser Unit Testing with Backbone Mocha Chai and RequireJS
require.config({
baseUrl: '/backbone-tests/',
paths: {
'jquery' : '/app/libs/jquery',
'underscore' : '/app/libs/underscore',
'backbone' : '/app/libs/backbone',
'mocha' : 'libs/mocha',
'chai' : 'libs/chai',
'chai-jquery' : 'libs/chai-jquery',
'models' : '/app/models'
/** https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en **/
.ghx-avatar-img {
height: 15px;
width: 15px;
}
.ghx-band-1 .ghx-issue .ghx-avatar {
left: 100px;
right: auto;
top: -3px;
### Keybase proof
I hereby claim:
* I am jccrosby on github.
* I am jccrosby (https://keybase.io/jccrosby) on keybase.
* I have a public key ASDMGsFBxp3OaX_17Zt0vWfTMMxuASO2ijRfsAoKjq3fiwo
To claim this, I am signing this object: