Skip to content

Instantly share code, notes, and snippets.

View chrisbraddock's full-sized avatar

Chris Braddock chrisbraddock

View GitHub Profile
@chrisbraddock
chrisbraddock / large-xfer.sh
Last active October 31, 2016 11:58
transfer large amount of files - e.g. a large multi-terabyte directory with many subdirectories between physical drives
# -f If the destination file cannot be opened, remove it and create a new file, without
# prompting for confirmation regardless of its permissions. (The -f option overrides
# any previous -n option.)
# -p Cause cp to preserve the following attributes of each source file in the copy: mod-
# ification time, access time, file flags, file mode, user ID, and group ID, as
# allowed by permissions. Access Control Lists (ACLs) and Extended Attributes (EAs),
# including resource forks, will also be preserved.
#
# If the user ID and group ID cannot be preserved, no error message is displayed and
# the exit value is not altered.
@chrisbraddock
chrisbraddock / change-app-priority.sh
Created May 1, 2014 14:22
osx change application (process) prirotity
sudo renice -10 <PID> # -20 is highest priority; 0 is normal
(function( skillet, $, undefined ) {
//Private Property
var isHot = true;
//Public Property
skillet.ingredient = "Bacon Strips";
//Public Method
skillet.fry = function() {
var oliveOil;
{
"name": "best-practices",
"description": "A package using versioning best-practices",
"author": "Charlie Robbins <charlie@nodejitsu.com>",
"main": "my-module.js",
"repository": {
"type": "git",
"url": "https://github.com/npm/npm.git"
},
"dependencies": {
@chrisbraddock
chrisbraddock / cron_legend
Last active December 20, 2015 12:49
cron legend
***** command to execute
┬┬┬┬┬
│││││
│││││
││││└───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
│││└────────── month (1 - 12)
││└─────────────── day of month (1 - 31)
│└──────────────────── hour (0 - 23)
└───────────────────────── min (0 - 59)
@chrisbraddock
chrisbraddock / gist:6082304
Created July 25, 2013 18:13
make jshint ignore lines/errors - thanks Brophy
// Between those lines, the W116 error will not be checked
// To get the error code, run on the command line: jshint --verbose <file>
/*jshint -W116 */
if (arr1[i] != arr2[i]) { return false; }
/*jshint +W116 */
{
"asi" : false, // Require semicolons
"boss" : false, // Don't allow variable assignments in conditionals
"browser" : true, // Standard browser globals should be predefined
"curly" : true, // Require curly braces for blocks (if, else, etc)
"eqeqeq" : true, // === should be required
"eqnull" : true, // == null comparisons should be tolerated
"evil" : true, // Use of eval is ok
"indent" : 4, // 4 spaces, soft-tabs
"latedef" : true, // Prohibit use of var before definition
@chrisbraddock
chrisbraddock / index.html
Last active December 15, 2015 08:09
basic html5 template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title></title>
<link rel="stylesheet" href="style.css"/>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
git remote add --track master mleung git://github.com/mleung/feather.git
@chrisbraddock
chrisbraddock / alphabet.js
Last active January 9, 2019 15:33
alphabet array
var alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];