Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active September 2, 2025 08:17
The introduction to Reactive Programming you've been missing

Get the absolute position of every link in an html document using JavaScript:

/**
 * The HTML <area> coords attribute needs the position of the left, top, right, bottom corner 
 * of the rectangle. Element.getBoundingClientRect returns a text rectangle object that encloses 
 * a group of text rectangles.
 */
function getElementAbsolutePosition(element) {
    var pos = {};

pos.left = 0;

# coding=UTF-8
from __future__ import division
import nltk
from collections import Counter
# This is a simple tool for adding automatic hashtags into an article title
# Created by Shlomi Babluki
# Sep, 2013
@A
A / Gruntfile.js
Last active December 22, 2015 17:19
'use strict';
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function (grunt) {
// grunt || grunt browser — разработка в браузере
@ashwin
ashwin / cowsayfortune.sh
Created August 14, 2013 14:25
A fun cowsay-fortune greeting in every new terminal session. Add to bashrc.
RANGE=2
number=$RANDOM
let "number %= $RANGE"
case $number in
0)
cowcommand="cowsay"
;;
1)
cowcommand="cowthink"
@barberj
barberj / tmux_cheatsheet.markdown
Last active May 11, 2023 07:31 — forked from henrik/tmux_cheatsheet.markdown
add move pane into new window. change window commands to some of my aliases

tmux cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@cheeaun
cheeaun / js-error-logging-services.md
Last active October 24, 2024 17:13
JavaScript error logging services
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active August 27, 2025 08:37
A badass list of frontend development resources I collected over time.
@willurd
willurd / web-servers.md
Last active September 1, 2025 05:45
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000