Skip to content

Instantly share code, notes, and snippets.

View Angelmmiguel's full-sized avatar

Ángel M Angelmmiguel

View GitHub Profile
@addyosmani
addyosmani / headless.md
Last active May 1, 2024 03:05
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@chetan
chetan / yardoc_cheatsheet.md
Last active May 4, 2024 11:12
YARD cheatsheet
@jefftrull
jefftrull / main.cpp
Created October 22, 2011 02:00
Example of embedding Ruby interpreter into C/C++ program
// very basic embedded Ruby interpreter for C++ programs
// thrown together by Jeff Trull <jetrull@sbcglobal.net> based on googling and asking questions on #ruby-lang
#include <ruby.h>
// access to C variables
static VALUE getter(VALUE ns, VALUE var) {
return Qfalse;
}
VALUE setter(VALUE ns, VALUE var, VALUE val) {
@denmarkin
denmarkin / resque.rake
Created September 20, 2011 11:02
My rake task for clearing Resque queues and stats
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version
# see https://github.com/defunkt/resque/issues/49
# see http://redis.io/commands - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."