Skip to content

Instantly share code, notes, and snippets.

@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active September 2, 2026 20:30
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@kipcole9
kipcole9 / function_clause.ex
Created October 23, 2019 11:04
Debug Elixir Function Clause errors
defmodule FunctionClause do
@moduledoc """
Format function clauses using Exception.blame/3
"""
@doc """
Given a `module`, `function`, and `args` see
if that function clause would match or not match.
This is useful for helping diagnose function
@bgauduch
bgauduch / 0 - Multiple git identities on one machine.md
Last active September 3, 2026 11:59
Multiple git identities on one machine: config per folder and per provider (personal vs work). Every command verified.

Multiple git identities on one machine

One machine, several git identities (personal vs work, GitHub vs GitLab, two accounts on one provider). Each repository picks its own name, email and credentials. In a hurry: Appendix B, once per rule.

A wrong identity does not fail: git commits and pushes under the wrong author. Part 1 ends with the check that catches it.

Requirements

Feature Minimum git
@nylki
nylki / char-rnn recipes.md
Last active August 1, 2026 05:16
char-rnn cooking recipes

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@ericlevine
ericlevine / migrate_repo.rb
Last active August 29, 2015 13:56
GitHub to GitHub repository migration script
require "json"
require "typhoeus"
require "pp"
# MigrateRepo usage instructions:
#
# The way this is used at Airbnb for migrating from GitHub to GHE is by
# creating a separate organization with no members called "migration",
# adding that as the target organization, and then once the migration
# has finished, moving it over to the intended location.
@namuol
namuol / INSTALL.md
Last active May 7, 2026 07:47
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@ymendel
ymendel / fishtank.html
Last active December 15, 2015 17:49
marquee fishtank — as seen at http://citizenx.cx/fishtank/
<html>
<head>
<title>Marquee Fishtank</title>
<style>
#fishtank {
width: 350px;
background-color: aqua;
}
#fish1 { color: red }
#fish2 { color: orange }
@rick
rick / bringit.rb
Created August 15, 2012 18:33
github summit fall 2012 hubot ignite talk
#!/usr/bin/env ruby
require 'github-campfire'
def ask_for_image(phrase)
`growlnotify -m "#{phrase}"`
GitHub::Campfire.notify("/img me #{phrase}", GitHub::Campfire::HUBOT)
end
phrases = [
'hubot ignite', # new presentation style
@paul
paul / _README.mkd
Created July 15, 2012 22:19
A better pretty_json.rb

Installation

  1. Copy prissy to ~/bin (or elsewhere in your $PATH)
  2. chmod +x prissy
  3. gem install awesome_print multi_json

Usage

$ some_command_that_outputs_json | prissy
#!/usr/bin/env ruby -pi.bak
# bacon before takes no argument
$_.sub!(/before\s*\(?\s*:each\s*\)?\s*/, 'before ')
# same with after
# No magic annoying spaces after 'should'.
# Matchers are methods on the Should object
$_.sub!(/\.should\s*/, '.should.')
# fix `should_not` -> `should._not`