This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "#ff7040", | |
"@brand-success": "#3aa6a6", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Copyright (c) Alan Dipert. All rights reserved. | |
;; The use and distribution terms for this software are covered by the | |
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | |
;; By using this software in any fashion, you are agreeing to be bound by | |
;; the terms of this license. | |
;; You must not remove this notice, or any other, from this software. | |
(defn paths | |
"Enumerate paths into a nested map." | |
([root] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns history | |
"Light wrappers and utils for js/history") | |
(defn back! [] (.back js/history)) | |
(defn forward! [] (.forward js/history)) | |
(defn go! [idx] (.go js/history idx)) | |
(defn replace-state! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the core Javascript code for http://windhistory.com/ | |
// I haven't done a full open source release, but I figured I'd put the most important | |
// D3 code out there for people to learn from. --nelson@monkey.org | |
/** Common wind rose code **/ | |
// Function to draw a single arc for the wind rose | |
// Input: Drawing options object containing | |
// width: degrees of width to draw (ie 5 or 15) | |
// from: integer, inner radius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Exit on error. Append "|| true" if you expect an error. | |
set -o errexit | |
# Exit on error inside any functions or subshells. | |
set -o errtrace | |
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR | |
set -o nounset | |
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` | |
set -o pipefail | |
# Turn on traces, useful while debugging but commented out by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table, | |
name, | |
formatReadableSize(c) compressed, | |
formatReadableSize(u) uncompressed, | |
floor((c/u) * 100, 4) percent | |
FROM ( | |
SELECT table, | |
name, | |
sum(data_compressed_bytes) c, | |
sum(data_uncompressed_bytes) u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ELinks 0.11.7 configuration file | |
## This is ELinks configuration file. You can edit it manually, | |
## if you wish so; this file is edited by ELinks when you save | |
## options through UI, however only option values will be altered | |
## and missing options will be added at the end of file; if option | |
## is not written in this file, but in some file included from it, | |
## it is NOT counted as missing. Note that all your formatting, | |
## own comments and so on will be kept as-is. | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# These are the commands available in an .envrc context | |
# | |
# ShellCheck exceptions: | |
# | |
# SC1090: Can't follow non-constant source. Use a directive to specify location. | |
# SC1091: Not following: (file missing) | |
# SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n". | |
# SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; the SET game in clojure.spec | |
;; inspired by https://github.com/jgrodziski/set-game | |
(require '[clojure.spec :as s]) | |
(s/def ::shape #{:oval :diamond :squiggle}) | |
(s/def ::color #{:red :purple :green}) | |
(s/def ::value #{1 2 3}) | |
(s/def ::shading #{:solid :striped :outline}) | |
(s/def ::card (s/keys :req [::shape ::color ::value ::shading])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Git commit hook: | |
.git/hooks/commit-msg | |
Check commit message according to guidelines | |
""" | |
import sys | |
import re |
OlderNewer