Skip to content

Instantly share code, notes, and snippets.

View pepe's full-sized avatar

Josef Pospíšil pepe

View GitHub Profile
@nathanmarz
nathanmarz / results-clojure-1.7.0.clj
Last active April 4, 2024 23:46
Specter 0.13.0 benchmark
Benchmark code at: https://github.com/nathanmarz/specter/blob/master/scripts/benchmarks.clj
Run against Clojure 1.7.0 and Java 1.7.0 on Mac OSX 10.11.6
Benchmark: get value in nested map (2500000 iterations)
Avg(ms) vs best Code
53.528 1.00 (-> data (get :a) (get :b) (get :c))
54.708 1.02 (-> data :a :b :c)

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@yogthos
yogthos / gallery.cljs
Last active March 30, 2024 17:36
script to download walpapers from windowsonearth.org
@uasi
uasi / vim.rb
Created November 30, 2010 16:46
Vim formula for Homebrew (EDIT: recent versions of official Homebrew distribution includes one)
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2'
head 'https://vim.googlecode.com/hg/'
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d'
version '7.3.682'
def features; %w(tiny small normal big huge) end
@dankrause
dankrause / _hover_example.py
Last active March 8, 2024 18:31
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)
@sogaiu
sogaiu / extract.md
Last active February 15, 2024 08:18
extract from "Auditory vs. articulatory training in exotic sounds" a 1970 study by Catford, J. C. Pisoni, David B. (https://files.eric.ed.gov/fulltext/ED042174.pdf)

AUDITORY VS. ARTICULATORY TRAINING IN EXOTIC SOUNDS

J. C. Catford and David E. Pisoni

Center for Research on Language and Language Behavior

The University of Michigan

Two groups of English speakers received either auditory or articulatory instruction in learning to produce exotic sounds.

@sogaiu
sogaiu / gist:fd13231e0f239e3b88a8019780f064f4
Created February 3, 2024 13:04
some bits of the jpm man page
NVIRONMENT
JANET_TREE
A convenient way to set the modpath, binpath, syspath, and
manpath all at once. This is equivalent to the --tree parameter
to jpm.
JANET_PATH
The location to look for Janet libraries. This is the only
environment variable Janet needs to find native and source code
modules. If no JANET_PATH is set, Janet will look in the default
@dz4k
dz4k / Draggable._hs
Last active December 25, 2023 10:47
Draggable window in _hyperscript
-- Usage: _="install Draggable(dragHandle: .titlebar in me)"
behavior Draggable(dragHandle)
init
if no dragHandle set the dragHandle to me
end
on pointerdown(clientX, clientY) from dragHandle
halt the event
trigger draggable:start -- hooks, e.g. for adding a drop shadow while dragging
measure my x, y
@sogaiu
sogaiu / life-of-a-janet-expression.md
Last active December 20, 2023 10:39
the life of a janet expression
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')