Skip to content

Instantly share code, notes, and snippets.

View ayumi's full-sized avatar
🍅
ᕕ( ᐛ )ᕗ

ayumi  yu ayumi

🍅
ᕕ( ᐛ )ᕗ
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active March 5, 2025 17:59
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@davidcornu
davidcornu / SoundParser.rb
Created August 25, 2011 17:23
Convert MP3 Files to Waveform Images in Ruby
# --------------------------------------------------------------------
# Create SoundCloud-style waveforms from mp3 files
# Author: David Cornu
# Credit for the idea goes to http://cl.ly/292t2B09022I3S3X3N2O
#
# Requirements:
# mpg123 - [ % brew install mpg123 ]
# imagemagick - [ % brew install imagemagick ]
# rmagick - [ % brew install rmagick ]
#
@ayumi
ayumi / kawaii_phrase.rb
Created April 5, 2012 03:29
Random positive 3-word phrase generator (e.g. "Enjoyable Green Turtle")
module KawaiiPhrase
# Makes awesome random phrases such as "Enjoyable Green Turtle"
ADJ_1 = [
'epic',
'tasty',
'shiny',
'mega',
'ultra',
'hyper',
@mperham
mperham / after.rb
Created July 4, 2012 19:30
Thread-friendly shared connection
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection }
end
end
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 12, 2025 13:38
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@shevron
shevron / LICENSE
Last active April 28, 2020 02:28
Send EC2 instance memory usage stats to CloudWatch using boto and IAM Roles
Copyright (c) 2015, Shahar Evron
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@scribu
scribu / repl.js
Last active December 23, 2017 15:20
Simplistic REPL for CasperJS
// Usage: require('repl').start.call(this);
// Press Ctrl+D to continue script
// Press Ctrl+C to exit.
require = patchRequire(require);
var system = require('system');
var utils = require('utils');
exports.start = function(prompt) {
@skanev
skanev / rubocop.rb
Last active February 12, 2025 02:36
A Rubocop wrapper that checks only added/modified code
#!/usr/bin/env ruby
# A sneaky wrapper around Rubocop that allows you to run it only against
# the recent changes, as opposed to the whole project. It lets you
# enforce the style guide for new/modified code only, as opposed to
# having to restyle everything or adding cops incrementally. It relies
# on git to figure out which files to check.
#
# Here are some options you can pass in addition to the ones in rubocop:
#
#!/bin/bash
#
# This script will mount /Users in the boot2docker VM using NFS (instead of the
# default vboxsf). It's probably not a good idea to run it while there are
# Docker containers running in boot2docker.
#
# Usage: sudo ./boot2docker-use-nfs.sh
#
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active March 2, 2025 23:22
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016