Skip to content

Instantly share code, notes, and snippets.

View usergenic's full-sized avatar
💭
Manifesting dreams! 🦄

Brendan Baldwin usergenic

💭
Manifesting dreams! 🦄
View GitHub Profile
@usergenic
usergenic / gist:cde35005fd97cf53b9585776077630f5
Created November 4, 2016 18:35
cd polymer/tattoo; npm install
> [email protected] install /Users/brendanb/src/github.com/polymer/tattoo/node_modules/nodegit
> node lifecycleScripts/install
[nodegit] Fetching binary from S3.
[nodegit] Failed to install prebuilt binary:
{ Error: Command failed: "/Users/brendanb/src/github.com/polymer/tattoo/node_modules/nodegit/node_modules/.bin/node-pre-gyp" install --fallback-to-build=false
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.12.2-node-v48-darwin-x64.tar.gz
node-pre-gyp ERR! stack at Request.<anonymous> (/Users/brendanb/src/github.com/polymer/tattoo/node_modules/nodegit/node_modules/node-pre-gyp/lib/install.js:101:37)
node-pre-gyp ERR! stack at emitOne (events.js:101:20)
@usergenic
usergenic / def-tag.html
Created October 26, 2016 18:12
Experimenting with js-less html element definition.
<link rel="import" href="../bower_components/polymer/polymer.html">
<dom-module id="def-tag">
<script>
class DefTag extends Polymer.Element {
static get is() { return 'def-tag'; }
static get config() {
return { properties: { name: { type: String } } };
}
connectedCallback() {
npm install -g polymer-cli
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/Users/brendanb/.nvm/versions/node/v6.3.0/bin/polymer -> /Users/brendanb/.nvm/versions/node/v6.3.0/lib/node_modules/polymer-cli/b
@usergenic
usergenic / vim_homebrew.rb
Created July 18, 2014 16:54
Homebrew Recipe for Vim w/ Lua, Ruby, Python interp
# modified from old Mike Grouchy blog post:
# http://mikegrouchy.com/blog/2012/05/compile-vim-with-python-support-on-osx-with-homebrew.html
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/'#, :revision => '6c318419e331'
version '7.4.373' #version '7.3.515'
def features; %w(tiny small normal big huge) end
func qs(arr []string) []string {
if len(arr) < 2 {
return arr
}
lte := []string{}
gt := []string{}
pivot := arr[len(arr)-1]
for index, elem := range arr {
if index == len(arr)-1 {
break
@usergenic
usergenic / install-nave-node-npm.sh
Last active February 23, 2016 22:52
nave -> node -> npm
#!/bin/bash
# This installs nave and node and npm. This is my
# ideal configuration as it allows easy updating of all
# packages and only provides a global node and npm as a
# convenience, since npm packages and node version are
# still managed per user.
# Change BASHRC_FILE if you want to ammend a different
# file that maybe gets sourced by your .bashrc etc.
@usergenic
usergenic / vars
Last active August 29, 2015 13:57
#!/bin/bash
# helper functions for immediate+persistent shell vars
# be sure to source ~/.vars in your ~/.bashrc etc.
#
# usage:
# $ var+ pdir /long/annoying/path/to/type/to/project/v1.0
# $ cd $pdir
# (start a new terminal tomorrow...)
# $ cd $pdir
@usergenic
usergenic / ggit.sh
Created December 13, 2013 00:17
Show status on all git repositories from current (or given first arg) directory. Useful in a Geektool screen etc.
#!/bin/bash
rootdir=$1
if [ -z $rootdir ]; then
rootdir=.
fi
for gitdir in `find $rootdir -name .git`; do
workdir=${gitdir%/*}
@usergenic
usergenic / failed spec message
Created September 17, 2013 18:07
Gandalf Spec
                                 .--.
                                 ,' |
                                 '  |
                               ,'    \
  __   __                     .'      |
  \ \ / /__ _  _              '       |
   \ V / _ \ || |            |        |              -.
    |_|\___/\_,_|         ___'        |             / |--
                     _,,-'            '--'''--._    | || |.-'\
                    /        ..._______         `:. |       ,'
;; STANDARD SCHEME. LOOK AT THOSE CLASSIC
;; END-OF-LINE PAREN SETS! I SEE 8 ON THE LAST LINE!
(define (quicksort ls . opt)
(let ((precedes? (if (null? opt) < (car opt))))
(define (partition ls pivot)
(let loop ((rest ls)
(smalls '())
(larges '()))