Skip to content

Instantly share code, notes, and snippets.

@i-Robi
i-Robi / notes-frequencies.json
Last active April 24, 2024 06:09
Note-frequency values
{
"C0": 16.35,
"C#0": 17.32,
"Db0": 17.32,
"D0": 18.35,
"D#0": 19.45,
"Eb0": 19.45,
"E0": 20.60,
"F0": 21.83,
"F#0": 23.12,
@eliotsykes
eliotsykes / rails_new_help_output.md
Last active March 31, 2024 17:09
"rails new" options explained

Run rails new --help to view all of the options you can pass to rails new:

$ bin/rails new --help
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /Users/eliot/.rbenv/versions/2.2.0/bin/ruby
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@tlberglund
tlberglund / git-loglive
Last active January 12, 2024 03:40
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
@adambray
adambray / pair_programming_exercises.md
Last active October 21, 2021 14:03
Pair Programming Exercises

Number to Ordinal

See full kata at codewars

Finish the function numberToOrdinal, which should take a number and return it as a string with the correct ordinal indicator suffix (in English). That is:

  • numberToOrdinal(1) ==> '1st'
  • numberToOrdinal(2) ==> '2nd'
  • numberToOrdinal(3) ==> '3rd'
  • numberToOrdinal(4) ==> '4th'
class JobSchedule
# External interface for calling the service
def self.call(object_id, opts={})
if perform_asynchronously?
Delayed::Job.enqueue(EnqueuedJob.new(name, object_id, opts))
else
perform(object_id, opts)
end
end
@adambray
adambray / ga_lesson_plan_template.md
Created January 28, 2015 22:36
Lesson Plan Template Markdown

Delivery Tips:

  • Think about how long you're talking
  • Move quicker sooner, slower later
  • Cold Call more often
  • Revisit LOs
  • Defer questions when appropriate

LESSON TITLE

@jshawl
jshawl / docker-compose.yml
Last active December 2, 2018 16:13
Simplest possible Wordpress + MySql + phpMyAdmin docker-compose.yml
version: '3.3'
services:
db:
container_name: db
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
# Patches Jekyll's built-in pagination to work with files *other* than the base index.html.
# Expects the following to be specified in your _config.yml:
#
# paginate_base: "blog" # Puts all pagination folders in the "blog" dir, e.g. "/blog/page2"
# paginate_index: "blog/index.html" # Paginates using the specified file
module Jekyll
class Page
@bradymholt
bradymholt / google_calendar_api_example.rb
Last active February 25, 2017 05:57
Google Calendar API with Ruby Client
#gem install 'google-api-client'
require 'google/api_client'
#Setup auth client
client_secrets = Google::APIClient::ClientSecrets.load #client_secrets.json must be present in current directory!
auth_client = client_secrets.to_authorization
auth_client.update!(
:scope => 'https://www.googleapis.com/auth/calendar',
:access_type => "offline", #will make refresh_token available