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 / 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 / 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 / apa-to-mla.md
Last active January 24, 2021 07:01
APA to MLA commas

Convert from APA style commas to MLA

This is for all your writer friends: for the MLA or APA purist, why not introduce a little excitement to their day with a belated April fools prank?

Installation

Download the comma script and chmod +x comma to make it executable.

Usage

#!/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
@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'
@nybblr
nybblr / README.md
Created January 13, 2015 17:00
Fancy angled tags

Extracted by SnappySnippet.

@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 / rails-with-bower.md
Last active November 27, 2023 15:41
Rails with Bower. Without bower-rails.
# 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 .
# Gemfile
ruby '2.1.1'
gem 'nokogiri'
gem 'pry'
# scrapey.rb
require 'rubygems'
require "net/http"