Skip to content

Instantly share code, notes, and snippets.

@jgsqware
jgsqware / hosts.conf
Created November 10, 2015 13:11
Docker: Update your hosts with docker-machine ips automatically
# Pattern
# <docker-machine name>=<host name>,<host name>,...
registry=docker-registry
@ourmaninamsterdam
ourmaninamsterdam / LICENSE
Last active July 24, 2024 17:00
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@DorkForce
DorkForce / scanScope.txt
Last active May 10, 2024 03:08
Console script - Search breakpoint model for value. SYNTAX: scanScope($scope.model, 'Fred');
console.log("Usage Syntax: scanScope(objectToScan, 'scanFor', ['whatToIgnore']); %c(whatToIgnore is optional and can be a string, or an array of strings) (scanScope can be shortened to ss)", 'color: red');
var abortAtLevel = 20,
callStack = 0,
errArray = [],
funArray = [],
scanLoop = function (whatToScan, scanValue, whatToIgnore, parentTree) {
scanValue = scanValue.toLowerCase();
if (Array.isArray(whatToIgnore)) {
whatToIgnore.forEach(function (ignoreVal) {
ignoreVal = lowerCase(ignoreVal);
@justinbmeyer
justinbmeyer / service.md
Last active August 29, 2015 14:03
Service Endpoint Example Documentation

Task

A task represents something to do. The task's service can CRUD tasks. Tasks can belong to other tasks and a single owner. Tasks have a belongs to and has many relationship with assignees.

create

Creates a task in the database.

@thadk
thadk / app-my-app-mod.js
Last active December 30, 2015 10:39
Backbone Marionette module starting from [this fork]( https://github.com/elycruz/generator-marionette ) and [this repo]( https://github.com/mrichard/generator-marionette ) and [for this comment]( https://github.com/mrichard/generator-marionette/issues/37 ) .
define([
'backbone',
'application',
'apps/my-app-mod/layout/my-app-mod-layout',
'apps/my-app-mod/my-app-mod-list',
'apps/my-app-mod/item/message-view',
'apps/my-app-mod/my-app-mod'
], function(Backbone, app, MyAppModLayout, MyAppModListController, MessageView, AppRouter) {
'use strict';
@justinbmeyer
justinbmeyer / REST relational algebra.md
Created September 20, 2012 02:07
A prescription for a rest endpoint.

Purpose

Client-side models are becoming more common. Most work with JSON-REST interfaces by default. However, there is no standards around manipulating the set of data returned by a rest service. This attempts to come to some standard.

Goal

  • Make it easy to understand and have close parallels with common SQL paradigms and relational algebra.
  • Make work with standard server-side Query string libraries.

Existing Problems

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active July 24, 2024 15:28
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@kraft001
kraft001 / solarized.bash
Created June 8, 2012 05:47
solarized Gnome Terminal + Tmux + Vim
# store all solarized files in one place
mkdir ~/.solarized
cd ~/.solarized
# http://www.webupd8.org/2011/04/solarized-must-have-color-paletter-for.html
git clone https://github.com/seebi/dircolors-solarized.git
eval `dircolors ~/.solarized/dircolors-solarized/dircolors.256dark`
ln -s ~/.solarized/dircolors-solarized/dircolors.256dark ~/.dir_colors
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
@TooTallNate
TooTallNate / repl-client.js
Created March 26, 2012 20:09
Running a "full-featured" REPL using a net.Server and net.Socket
var net = require('net')
var sock = net.connect(1337)
process.stdin.pipe(sock)
sock.pipe(process.stdout)
sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true)