Skip to content

Instantly share code, notes, and snippets.

@sgardn
sgardn / SassMeister-input.scss
Created November 14, 2014 21:43
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$blue : blue;
$white : white;
div {
background:blue;
@sgardn
sgardn / background.html
Created November 2, 2016 20:10 — forked from srsudar/background.html
Pasting from the system clipboard using a Chrome extension.
<!DOCTYPE html>
<html>
<head>
<script src="background.js"></script>
</head>
<body>
<textarea id="sandbox"></textarea>
</body>
javascript: (function() {
console.log("inserting bookmarklet");
function testAdd() {
currentSong = scrapeInfo();
if (currentSong) {
dest = document.querySelectorAll("#pandora-output-list")[0];
curVal = dest.value;
if (curVal.indexOf(currentSong.to_s) == -1) {
console.log("inserting new song!");
package main
import (
"bufio"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
@sgardn
sgardn / parser.rb
Last active October 27, 2020 16:53
#!/usr/bin/env ruby
require 'csv'
require 'prawn'
# require 'pry'
# require 'prawn/table'
Prawn::Font::AFM.hide_m17n_warning = true
NUMERIC_FORMAT = /^(\d*). /
SIMULATION_FORMAT = /(\d+\. .*)/
@sgardn
sgardn / visualize-stacking-contexts.js
Created October 27, 2020 03:06 — forked from tlrobinson/visualize-stacking-contexts.js
Some console output to help you visualise stacking contexts on a page (no jquery)
/*
Usage:
* Paste this into your dev tools console (or even better as a snippet)
* It will parse the page and find all the things that create a new stacking context
and dump some info about them to the console. It will also outline them on the page.
* This is pretty rough and probably misses heaps of bugs and edge cases.
*/
function highlight(el) {