Skip to content

Instantly share code, notes, and snippets.

@alysonla
alysonla / active-issues.sql
Last active September 19, 2023 11:21
Queries that power the open source section of the 2016 Octoverse report https://octoverse.github.com/2016/
-- Active issues
-- Count of total active issues in the specified time frame
-- Source: githubarchive public data set via Google BigQuery http://githubarchive.org/
SELECT
COUNT(DISTINCT JSON_EXTRACT_SCALAR(events.payload, '$.issue.id')) AS events_issue_count
FROM (SELECT * FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31')))
AS events
-- 10,723,492 active issues
@tristandostaler
tristandostaler / InstallSelenium.sh
Created July 7, 2016 16:27
How to install correctly python Selenium (tested on ubuntu gnome)
apt-get install ipython
apt-get install python-pip
pip install selenium
mkdir /root/bin
cd /root/bin
wget https://github.com/mozilla/geckodriver/releases/download/v0.9.0/geckodriver-v0.9.0-linux64.tar.gz
tar -xvzf geckodriver-v0.9.0-linux64.tar.gz
rm geckodriver-v0.9.0-linux64.tar.gz
chmod +x geckodriver
cp geckodriver wires
@mbostock
mbostock / .block
Last active April 23, 2020 23:35
Rainbow Pack
license: gpl-3.0
height: 960
redirect: https://observablehq.com/@mbostock/rainbow-pack
@zanarmstrong
zanarmstrong / index.html
Last active May 29, 2019 21:02
Which is bigger: Africa or North America?
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="overlay.css">
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>
<body>
<div id = "description">
<h2>Is Africa bigger than North America?</h2>
<p><strong>Yes!</strong> In fact, North America, including United States, Canada, Mexico, and Greenland, could easily fit inside Africa with plenty of room left to add Central America, Argentina, Chile, and Bolivia too.</p>
<p>Most of the maps we use day to day distort the relative sizes of countries, making countries near the equator look relatively small and countries near the north and south pole look relatively huge. However, we can compare the true sizes of countries by using a different type of map.</p>
<div><button name="Sweden,Madagascar">Sweden vs Madagascar</button><button name="Australia,Antarctica">Australia vs Antarctica</button><button name="Europe,Brazil">Europe vs Brazil</button><button name="US,Australia">United States vs Australia</b
@sunaku
sunaku / shed
Last active July 30, 2020 02:16
POSIX shell script equivalent of https://github.com/mplewis/shed
#!/bin/sh -e
#
# POSIX shell script equivalent of:
# <https://github.com/mplewis/shed>
#
# Usage: shed [SHELL_ARGUMENTS...]
#
# Executes stdin after you edit it.
# If $EDITOR is unset, uses $PAGER.
# If $PAGER is unset, uses cat(1).
@eagereyes
eagereyes / index.html
Last active June 7, 2016 21:09
Multiples chart in D3 to show how much more CEOs make than average workers.
<!DOCTYPE html>
<html>
<head>
<title>Large Multiples</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
rect {
fill: #ddd;
stroke: none;
}
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@swarminglogic
swarminglogic / subtlemark.sh
Last active December 1, 2015 21:53
Subtlemark: Tool for adding subtle watermarks to images. Parameter customization: position (TL,TC,TR,BL,BC,BR), font, font-size, caption, textcolor, bgcolor. Also supports predefined styles.
#!/bin/bash
version=0.1.4
versionDate="2014-09-02"
function showHelp() {
echo "subtlemark - add subtle watermarks to images
Usage:
----------------------------------------

Automatic Label Placement

This example is an extension of Mike Bostock’s tutorial Lets Make a Map that implements automatic label placement using collision detection. This is a proof of concept more than anything, not polished in any way.

References

@mbostock
mbostock / .block
Last active February 1, 2020 08:52
Swiss Cantons & Lakes
license: gpl-3.0