Skip to content

Instantly share code, notes, and snippets.

View achiurizo's full-sized avatar
🌐

Arthur Chiu achiurizo

🌐
View GitHub Profile
#include <stdlib.h>
#include <stdio.h>
#include <ruby.h>
#include <node.h>
#include <oboe/oboe.h>
oboe_reporter_t udp_reporter;
#ifdef RUBY_GC_EVENT_ALL
// requires https://github.com/tmm1/brew2deb/blob/master/packages/ruby/patches/gc-hooks.patch
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 31, 2026 19:44
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@javan
javan / screenshot.js
Created June 19, 2012 21:40
Create a screenshot of any URL using phantomjs (headless webkit)
//
// Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png
//
var system = require('system');
var url = system.args[1];
var filename = system.args[2];
var page = new WebPage();
page.open(url, function (status) {
@nrrrdcore
nrrrdcore / border.css
Created May 2, 2012 20:44
Faded/Gradient Borders in Pure CSS
.border-container {
width: 28%; /* border will be on the left on this container */
float: right;
overflow: hidden; /* only needed if floating container */
min-height: 600px; /* static height if you want your container to be taller than its content */
-moz-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
-webkit-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
border-width: 0 0 0 1px;
-webkit-border-image:
@jch
jch / rabbitmq-install-osx.md
Created April 28, 2012 23:48
Troubleshooting RabbitMQ installation on OSX via homebrew

Troubleshooting RabbitMQ installation on OSX via homebrew

brew update
brew install rabbitmq

To see if rabbitmq is running after following the installation instructions:

launchctl list | grep rabbit
> 48303	-	homebrew.mxcl.rabbitmq
@jamesarosen
jamesarosen / nginx.conf
Created April 28, 2012 18:58
Rails + EM + nginx Proxy
# When a proxy request comes in, send it to Rails for authorization:
location /api/proxy {
proxy_pass http://rails;
}
# Rails will send an X-Accel-Redirect if the proxy request is valid,
# attaching any domain information the proxy needs so it doesn't have
# to do database lookups:
location /proxy {
internal;
@pithyless
pithyless / either.rb
Created March 27, 2012 14:44
Chaining Either for Ruby
# A chainable Either monad for Ruby
#
# Examples
#
# Either.right('s') >> proc { |s| Either.right(s + '-1') } >> proc { |s| Either.right(s + '-2') }
# #=> #<Either @left=nil, @right="s-1-2">
#
# Either.right('s') >> proc { |s| Either.left('error!') } >> proc { |s| Either.right(s + '-2') }
# #=> #<Either @left='error!', @right=nil>
#
@chetan
chetan / yardoc_cheatsheet.md
Last active April 2, 2026 16:49
YARD cheatsheet
@postmodern
postmodern / shell_server.rb
Created February 5, 2012 02:14
A WEBrick shell server with async output
require 'webrick'
class Server < WEBrick::HTTPServlet::AbstractServlet
def self.start(port,host=nil)
server = WEBrick::HTTPServer.new(:Host => host, :Port => port)
server.mount '/', self
trap('INT') { server.shutdown }
@mislav
mislav / aprompt.png
Last active May 17, 2025 18:20
My zsh prompt. No oh-my-zsh needed
aprompt.png