Skip to content

Instantly share code, notes, and snippets.

View nybblr's full-sized avatar
🌱
I help developers craft their best work, achieve goals, and never stop growing.

Jonathan Lee Martin nybblr

🌱
I help developers craft their best work, achieve goals, and never stop growing.
View GitHub Profile
# Gemfile
ruby '2.1.1'
gem 'nokogiri'
gem 'pry'
# scrapey.rb
require 'rubygems'
require "net/http"
# Live cells with:
# < 2 living neighbors dies to underpop
# > 3 living neighbors dies to overpop
# Otherwise, lives!
#
# Dead cells with exactly 3 living neighbors is born
#
# . 0 .
# . 0 .
# . 0 .
@nybblr
nybblr / README.md
Created January 13, 2015 17:00
Fancy angled tags

Extracted by SnappySnippet.

@nybblr
nybblr / drop-zone.emblem
Created June 25, 2015 22:06
Ember file uploads
div style="width:500px;height:500px;border:1px solid black;"
button click="browse"
| Browse
button click="upload"
| Upload
file-upload url="/files" onfile="onfile"
= yield
@nybblr
nybblr / unicorn.sh
Created November 13, 2012 02:25 — forked from troex/unicorn.sh
Unicorn start/stop/restart script for Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs mysql
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: unicorn initscript
# Description: Unicorn is an HTTP server for Rack application
### END INIT INFO
require 'date'
require 'yaml'
data = []
File.open "albert.rec" do |f|
f.each_slice(2) do |slice|
# key = items.delete_at(0).downcase
reads = slice.map do |line|
items = line.chomp.split(/\s+/)
require 'yaml'
require 'csv'
class PlotLaser < Processing::App
def setup
@data = YAML.load File.open("albert.yml")
@smooth = false
no_smooth
@frame_index = 0
@nybblr
nybblr / ember-data-stores.md
Created January 26, 2016 17:26
Ember Data: Multiple data stores

Multiple Ember Data stores

Need a separate data store? Maybe a temporary one for search results? Go for it!

// app/components/search-box.js
import Ember from 'ember';

export default Ember.Component.extend({
  store: Ember.inject.service('search-store'),
@nybblr
nybblr / .babelrc
Created March 7, 2017 18:00
ES2017 build pipeline in 5 seconds.
{
"presets": [
"es2015",
"es2016",
"es2017"
],
"plugins": []
}
@nybblr
nybblr / aliases.bash
Created February 12, 2015 22:00
Git aliases for writers
alias la='ls -la'
alias gl='git pull'
alias gp='git push'
alias gb='git branch'
alias gco='git checkout'
alias gs='git status -sb'
alias gc='git commit -m'
alias gaa='git add -A'