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
@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
# 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 / rails-with-bower.md
Last active November 27, 2023 15:41
Rails with Bower. Without bower-rails.
@nybblr
nybblr / animals.rb
Created December 11, 2014 17:04
Module "inheritance" and ancestor tree.
module Fishish
def kind
"fish#{super}"
end
end
module Dogish
def kind
"dog#{super}"
end
@nybblr
nybblr / README.md
Created January 13, 2015 17:00
Fancy angled tags

Extracted by SnappySnippet.

@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'
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v