Skip to content

Instantly share code, notes, and snippets.

@DomPizzie
DomPizzie / README-Template.md
Last active Jun 22, 2021
A simple README.md template
View README-Template.md

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@PurpleBooth
PurpleBooth / README-Template.md
Last active Jun 20, 2021
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@imjasonh
imjasonh / markdown.css
Last active Jun 10, 2021
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@hrldcpr
hrldcpr / tree.md
Last active Jun 9, 2021
one-line tree in python
View tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@guypursey
guypursey / .block
Last active Jun 7, 2021 — forked from mbostock/.block
Wrapping long labels with D3 v4 (sample data)
View .block
license: gpl-3.0
@steveharoz
steveharoz / .block
Last active May 5, 2021 — forked from mbostock/.block
d3-force testing ground
View .block
license: gpl-3.0
height: 1030
scrolling: yes
@lucasfais
lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@wjmazza
wjmazza / google-sheets-colour-preview.js
Last active May 4, 2021 — forked from Pathoschild/google-sheets-color-preview.js
A Google Sheets script which adds colour preview to cells. When you edit a cell containing a valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to that colour and the font colour will be changed to the inverse colour for readability.
View google-sheets-colour-preview.js
/*
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a
valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to
that colour and the font colour will be changed to the inverse colour for readability.
To use this script in a Google Sheets spreadsheet:
1. go to Tools » Script Editor » Spreadsheet;
2. erase everything in the text editor;
3. change the title to "Set colour preview on edit";
@vegard
vegard / primes.py
Created Sep 21, 2018
Prime factorisation diagram
View primes.py
# -*- coding: utf-8 -*-
#
# Author: Vegard Nossum <vegard.nossum@gmail.com>
import math
import os
import sys
import cairo
@signed0
signed0 / gist:2031157
Created Mar 13, 2012
Google Polyline encoder & decoder
View gist:2031157
'''Provides utility functions for encoding and decoding linestrings using the
Google encoded polyline algorithm.
'''
def encode_coords(coords):
'''Encodes a polyline using Google's polyline algorithm
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html
for more information.