Skip to content

Instantly share code, notes, and snippets.

View toch's full-sized avatar
🐱

Christophe Philemotte toch

🐱
View GitHub Profile
@searls
searls / gloan.sh
Last active August 20, 2018 15:22
Clone into a new repo and quickly switch into it. Helps avoid a haphazard collection of unorganized github repos all over my home directory. Once it's cloned (or even if it errors), just hit Paste & it'll change into the directory of the repo.
#!/bin/sh -e
# A simple script to keep a tidy ~/code directory organized by owner & then repo
# When the script is done, just hit command-v to switch into the directory
# (Github and Mac only. Sorry, openness!)
#
# Usage:
# gloan <org>/<repo>
# Or:
# gloan <org> <repo>
require 'minitest/autorun'
class FooTest < Minitest::Test
def self.profile name
define_method("test_profile_#{name}") do
# start timer
10.times { send name }
# end timer
if performace_regresses
flunk "you failed"
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

require 'slippery'
require 'fileutils'
require 'tempfile'
require_relative 'watch_task'
namespace :slippery do
extend Slippery::ProcessorHelpers::ClassMethods
NAME = 'learn_to_learn'

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@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"