Skip to content

Instantly share code, notes, and snippets.

@addyosmani
addyosmani / headless.md
Last active May 17, 2024 03:38
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.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@neomatrix369
neomatrix369 / PerformanceRelated.md
Last active November 3, 2023 20:27
Interesting links in the areas of HPC, low latency, mechanical harmony/sympathy, garbage collection
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 4, 2025 16:05
A badass list of frontend development resources I collected over time.
@stuartsierra
stuartsierra / spellcheck.clj
Created July 9, 2013 01:47
Example implementation of Norvig's Spellchecker in Clojure, using core.async
;; Example implementation of Norvig's Spellchecker in Clojure,
;; using core.async
;;
;; There are probably some bugs in this.
;;
;; Original problem: https://github.com/ericnormand/spelling-jam
;; from Lambda Jam, Chicago, 2013: http://lambdajam.com/
;;
;; Clojure core.async introduction:
;; http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
/*
* call-seq:
* Rugged::Repository.new(name, options = {}) -> repository
*
* Open a Git repository with the given +name+ and return a +Repository+ object
* representing it.
*
*/
static VALUE rb_git_repo_new(int argc, VALUE *argv, VALUE klass)
{
@jcromartie
jcromartie / async_expansion.clj
Created July 13, 2013 19:35
Macro expansion of (go (+ 1 1))
;; (macroexpand-1 '(go (+ 1 1)) yields ...
(clojure.core/let
[c__2247__auto__
(clojure.core.async/chan 1)
captured-bindings__2248__auto__
(clojure.lang.Var/getThreadBindingFrame)]
(clojure.core.async.impl.dispatch/run
(clojure.core/fn
[]
@urschrei
urschrei / basemap_descartes.py
Last active November 6, 2020 02:49
How to plot Shapely Points using Matplotlib, Basemap, and Descartes
"""
required packages:
numpy
matplotlib
basemap: http://matplotlib.org/basemap/users/installing.html
shapely: https://pypi.python.org/pypi/Shapely
descartes: https://pypi.python.org/pypi/descartes
random
@lukmdo
lukmdo / lehmer.py
Last active May 23, 2021 23:39
Permutations by Lehmer codes
"""
Permutations by Lehmer codes (http://en.wikipedia.org/wiki/Lehmer_code)
Inspired by http://stackoverflow.com/a/3241894/212278
Given input sequence
>>> seq = ["A", "B", "C", "D"]
>>> lehmer_code = [2, 1, 0, 0]
>>> int_from_code(lehmer_code)
6
>>> list(lehmer.iter_perm(['A', 'B', 'C']))
module Jekyll
# Convert org-mode files.
require 'org-ruby'
class OrgConverter < Converter
safe true
def setup
# No-op
end