Skip to content

Instantly share code, notes, and snippets.

View monokrome's full-sized avatar
😻
meow

Bailey Stoner monokrome

😻
meow
View GitHub Profile
directive 'autoFocus', ->
scope: no
link: ($scope, $element) -> $element.focus()
@monokrome
monokrome / glp.yml
Last active August 29, 2015 13:57
Simple GLP configuration example.
# Install glp in your project.
npm install -g glp
# Create a config file as explained by the other file in this gist.
# Run glp (not gulp) to build!
glp
# watch files for changes
glp watch
angular.module 'app'
.controller 'app.controller', [
'$scope'
].concat ($scope) ->
@monokrome
monokrome / removerequire.vim
Last active August 29, 2015 13:57
Angular Vim macros.
" For converting regular modules
0v/=
xf[v%x/concat
G/concat
bbvf.hp{VggdGpVG<vf/=
xjkkJF[vf xvgg<
" For converting services
v/=
xf(VG{dp?]
@monokrome
monokrome / glp.yml
Last active August 29, 2015 13:56
Example configuration format for GLP (http://github.com/monokrome/glp)
# This file can be in the same directory that you run `gulp` from, or
# it can be ./etc/, your home directory, or any other system directory
# that a good piece of software would expect. Some example locations:
#
# ~/.config/glp.yml
# /usr/local/etc/glp.yml
# /etc/glp.yml
# C:\System32\glp.yml (This is smart enough to know what drive Windows is on)
#
# This automatic configuration discovery is provided by PreferJS.
@monokrome
monokrome / alternates.json
Created February 4, 2014 01:52
Example for a potential CatJugglers media description structure.
{
"objects": [
{
"type": "rss",
"title": "monokro.me",
"link": "http://monokro.me/feed.xml",
"tags": ["blog", "monokro.me"]
},
{
from dateutil.relativedelta import relativedelta
import datetime
def human_readable(delta):
names = [
'years',
'months',
'days',
'hours',
@monokrome
monokrome / CLASSIFIERS
Created December 30, 2013 22:22
Simple, example base skeleton for a portable Python package.
Replace this with your classifiers.
@monokrome
monokrome / interfaces.coffee
Last active January 9, 2018 15:00
Interfaces in CoffeeScript
class Host
constructor: ->
interfaces = @constructor.interfaces
if interfaces?
for interface in interfaces
_.extend @, interfaces
@implements: (host, interface) ->
# This effectively makes host optional
@monokrome
monokrome / allow_docker_access.sh
Last active December 27, 2015 21:39
Allow Shipyard to access docker on port 4243.
sudo ufw allow from $(docker inspect $(docker ps | grep 'shipyard/shipyard' | grep Up | cut -d \ -f 1) | grep IPAddress | cut -f 4 -d \") to any port 4243