Skip to content

Instantly share code, notes, and snippets.

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

Anthony Pipkin apipkin

🤖
^_^
View GitHub Profile
YUI.add('couch-base', function(Y) {
var LANG = Y.Lang,
IS_BOOLEAN = LANG.isBoolean,
IS_STRING = LANG.isString,
IS_NUMBER = LANG.isNumber,
IS_OBJECT = LANG.isObject,
DATA_SOURCE = 'dataSource',
EVENT_ERROR = 'couch:error',
@apipkin
apipkin / bmvzvr.markdown
Last active February 23, 2019 19:48
Bumper Ball
var BASE_URL = '/',
BASE_IO = {
uri : null,
json : null,
on : {
success : function(id,o,args){ alert('id : ' + id + "\n\no: " + o + "\n\nargs: " + args);},
failure : function(args){alert("Fail!\n\nargs: " + args);}
}
},
GALLERY_OVERLAY_MODAL = {
@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:###

@apipkin
apipkin / day1.md
Last active August 22, 2016 19:07
Introduction to JavaScript
@apipkin
apipkin / post-merge
Created May 14, 2016 21:22 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"

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
| |