Skip to content

Instantly share code, notes, and snippets.

View gist:514766
// for example purposes
@implementation RLHTMLView : CPView
DOMElement HTMLDOMElement;
- (id)initWithFrame:(CGRect)aRect
self = [super initWithFrame:aRect];
alexdreher / rcov.rake
Created Nov 10, 2010 — forked from zhengjia/gist:395021
rcov raketask for Rails 3, RSpec 2
View rcov.rake
# Forked to get it working with Rails 3 and RSpec 2
# From
# Save this as rcov.rake in lib/tasks and use rcov:all =>
# to get accurate spec/feature coverage data
# Use rcov:rspec or rcov:cucumber
# to get non-aggregated coverage reports for rspec or cucumber separately
View favicon.html
<!-- Favicons and touch icons -->
<!-- For retina-display iPads -->
<link href="/assets/images/apple-touch-icon-xlarge.png" rel="apple-touch-icon-precomposed" sizes="144x144" type="image/png"/>
<!-- For retina-display iPhones -->
<link href="/assets/images/apple-touch-icon-large.png" rel="apple-touch-icon-precomposed" sizes="114x114" type="image/png"/>
<!-- For iPad 1 -->
<link href="/assets/images/apple-touch-icon-medium.png" rel="apple-touch-icon-precomposed" sizes="72x72" type="image/png"/>
<!-- For iPhone 3G, iPod Touch and Android -->
<link href="/assets/images/apple-touch-icon-small.png" rel="apple-touch-icon-precomposed" type="image/png"/>
<!-- For Nokia -->
lvnilesh / install-chef-server.txt
Last active Feb 24, 2018
install chef server 11
View install-chef-server.txt
sudo dpkg -i chef-server*
sudo chef-server-ctl reconfigure
sudo chef-server-ctl test
mkdir -p ~/.chef
sudo cp /etc/chef-server/chef-webui.pem ~/.chef/
dahlia / lisp.rb
Created Sep 2, 2010
30 minutes Lisp in Ruby
View lisp.rb
# 30 minutes Lisp in Ruby
# Hong Minhee <>
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,
clemensg / curl_libuv_example.c
Last active Apr 5, 2022
An example on how to use libuv with libcurl's multi interface Should be equally fast on Unixes (uses epoll/kqueue/etc like libev/libevent) but MUCH faster on Windows due to libuv's usage of IO completion ports. Could come in handy if you have to manage several hundreds or thousands of connections!
View curl_libuv_example.c
#include <stdio.h>
#include <stdlib.h>
#include <uv.h>
#include <curl/curl.h>
uv_loop_t *loop;
CURLM *curl_handle;
uv_timer_t timeout;
typedef struct curl_context_s {
quark-zju /
Last active Nov 5, 2022
Trace all function calls using gdb
#!/usr/bin/env python
import gdb
inside_gdb = True
except ImportError:
inside_gdb = False
if inside_gdb: