Skip to content

Instantly share code, notes, and snippets.

View JonRowe's full-sized avatar
💭
⛵️

Jon Rowe JonRowe

💭
⛵️
View GitHub Profile
@janko
janko / benchmark.rb
Last active August 29, 2015 14:18
Minitest loads *slower* than RSpec?
require "benchmark/ips"
File.write "minitest_test.rb", <<-EOS
require "minitest/autorun"
require "minitest/pride"
class MintestTest < Minitest::Test
def test_foo
assert true
end
@NZKoz
NZKoz / aa_instructions.md
Created May 2, 2012 03:07
Back Up All Your Gmail
  • Install getmail (aptitude install getmail4)
  • Set Up Your Imap Server (tl;dr)
  • getmail
  • ruby date_based_archive.rb ~/Maildir/.Archive
@threedaymonk
threedaymonk / gist:2888097
Created June 7, 2012 10:33
Disable access-time logging on Raspberry Pi Debian
~ > cat /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mmcblk0p2 / ext4 defaults,noatime,nodiratime 0 0
#/dev/mmcblk0p3 none swap sw 0 0
@sugendran
sugendran / gist:4974828
Created February 18, 2013 02:42
build and uplaod to test flight
#!/bin/sh
# A script to build your iOS app and send it to test flight
# Distributed on an as is and I accept no responsiblity for what it does licence
# For more info: http://www.abandonedexpression.com/2011/06/continuous-integration-with-xcode.html
# I'm assuming that your project is in the src directory of your repository
PROJECT_DIRECTORY="${PWD}/src"
# The target we're building
TARGET_NAME="My Project"
# The name for the .app and .ipa files that get created
@xaviershay
xaviershay / github_requests.md
Last active April 11, 2018 03:20
Pull request feature requests

Hello Github,

Pull requests are not serving me well on large reviews. Here are some problems and suggested enhancements that would make me happy.

  • Mark comment as "resolved" (see google docs for an example). As code changes, comments get lost or made redundant, and it is not clear (to either the author or reviewers) which are still relevant and which have been addressed. Resolving a comment doesn't need to make it dissappear, but I need to be able to see "which comments have not been addressed" somehow. This feature would be the most useful to me.
  • Reply to a comment. This can be done in effect on line comments (assuming there is only one), but cannot on PR comments. Particularly with many threads, the lack of this makes a review hard to follow.
  • Explicit "approve/block" life cycle. The block is actually more important to me ... often on a PR that has been incrementally improved I want to "block" final merge of it until I get a chance to rebase/squash and generally pretty it up. The block can be over
@evadne
evadne / messages.ex
Last active October 11, 2020 22:30
Stream Iterator
defmodule StreamIterator.Messages do
@moduledoc """
The Stream Iterator can be used to consume items from an Elixir Stream incrementally.
## Examples
### Infinite Streams
When used on infinite streams such as the ones returned by `Stream.cycle/1`, the Stream
Iterator will always return the next item.
@ajosanchez
ajosanchez / FO4_terminal_hack.rb
Last active December 16, 2020 13:11
This will help you crack those tricky terminals in the Fallout series. Just run this ruby script and enter each word separated only with a slash and no spaces (ex: kid/cat/pop/dog). It will display each words' total matches minus any words that had no matches. Then once you guess enter in the guess word with the likeness returned from the termin…
class Hack
def initialize words
@words = words.downcase.split(/\/|\s|,\s|\,/)
@splitwords = []
@words.each { |w| @splitwords << w.split('') }
show_likely
end
def deduct
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@masonforest
masonforest / gist:4048732
Created November 9, 2012 22:28
Installing a Gem on Heroku from a Private GitHub Repo

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

  1. Get an OAuth Token from GitHub

First you will need to get an OAuth Token from GitHub using your own username and "note"

@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs: