Skip to content

Instantly share code, notes, and snippets.

View apipkin's full-sized avatar
🤖
^_^

Anthony Pipkin apipkin

🤖
^_^
View GitHub Profile
@apipkin
apipkin / gist:235af20a372a9942b886
Created August 18, 2014 14:39
Simple hapi.js JSON "Hello world"
var Hapi = require('hapi'),
server = new Hapi.Server(3001);
server.route({
path: '/{name?}',
method: 'GET',
handler: function (req, rep) {
rep({
greeting: 'Hello, ',
@apipkin
apipkin / marquee-plugin.css
Created July 30, 2014 00:46
jQuery Plugin for a Marquee - See it at http://apipkin.jsbin.com/gorige/3/
.marquee {
white-space: nowrap;
overflow: hidden;
background: purple;
color: white;
padding: 6px 0;
}
.marquee > .message {
position: relative;
}
.marquee {
width: 80%;
overflow: hidden;
}
.message {
white-space: nowrap;
position: relative;
}
@apipkin
apipkin / day1.md
Last active August 22, 2016 19:07
Introduction to JavaScript
@apipkin
apipkin / SSHFS.md
Last active October 30, 2017 13:44

###To mount an SSHFS drive:###

  1. Install from osxfuse.github.io

  2. $ sshfs -p 22 <user>@<host>:/path/to/directory/to/mount ~/Desktop/<mount_directory> -oauto_cache,reconnect,noappledouble,negative_vncache,volname=<volume_name>

###If the mount disconnects due to network failure (or something else), fix it by:###

http://wiki.ecmascript.org/doku.php?id=globalization:messageformatting

['Some text before', {
    type: 'plural',  // can be plural or gender/select
    valueName: 'numPeople',  // placeholder for switch value
    offset: 1,  // optional for plural, invalid for select
    one: 'Some message ${ph} with ${#} value', // no gender specific msg necessary
    few: [ 'Optional prefix text for |few|', {
       type: 'select',
@apipkin
apipkin / gist:7252397
Created October 31, 2013 16:11
removes mismatches between object a and object b
function removeMismatch (objA, objB) {
var key, val;
for (key in objA) {
val = objA[key];
if (!objB[key] || typeof objA[key] !== typeof objB[key]) {
delete objA[key];
} else {
if (typeof objA[key] === 'object') {
function HideShow () {};
HideShow.ATTRS = {
styleSheet: {
valueFn: '_styleSheetValFn'
}
};
Y.mix(HideShow.prototype, {
datatable/
|
+- assets/
+- docs/
+- js/
| |
| +- helpers/
| | |
| | +- formatters.js
| |
spinner = {
fn: function () {
var char = spinner.chars.shift();
process.stdout.write('\x1B[s' + char + '\x1B[u');
spinner.chars.push(char);
},
chars: ['—', '\\', '|', '/'],