This file contains hidden or 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
-- StatsD.php ported to lua | |
local math = require "math" | |
local os = require "os" | |
local socket = require "socket" | |
local type, pairs, ipairs, next = type, pairs, ipairs, next | |
local pcall = pcall | |
math.randomseed(os.time()) |
This file contains hidden or 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
TODO: | |
- edit /opt/statsd/local.js | |
- correct the graphite host to localhost | |
- if desired, put 'debug: true' in there | |
- make the box accessible via the hostname 'graphite' | |
- patch graphite, like described in https://answers.launchpad.net/graphite/+question/152851 |
This file contains hidden or 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
#First class = role web (calls logstash::common to setup directory structure) | |
class logstash::web( | |
$version = '1.1.0beta8' | |
) { | |
if !defined(Class['logstash::common']) { | |
class {'logstash::common': | |
version => $version | |
} | |
} | |
} |
This file contains hidden or 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
(function(b) { | |
var a = b.createElement("a"); | |
var s = b.createElement("span"); | |
s.innerText = "Download"; | |
a.appendChild(s); | |
a.href="http://media.soundcloud.com/stream/"+b.querySelector("#main-content-inner img[class=waveform]").src.match(/\.com\/(.+)\_/)[1]; | |
a.setAttribute("class", "pl-button"); | |
a.setAttribute("style", "background-image: url(http://soundcloud.com/images/icons_mini.png?unicorn26); background-repeat: no-repeat; padding-left: 18px; background-position: -77px -236px;"); | |
a.download = b.querySelector("em").innerText+".mp3"; | |
b.querySelector(".primary").appendChild(a); |
This file contains hidden or 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
<html> | |
<style type="text/css" media="screen"> | |
#table { | |
position: absolute; | |
top: 30px; | |
bottom: 0; | |
left: 10px; | |
right: 10px; | |
} | |
#header { |
This file contains hidden or 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
From: Chris DeSalvo <[email protected]> | |
Subject: Why we can't process Emoji anymore | |
Date: Thu, 12 Jan 2012 18:49:20 -0800 | |
Message-Id: <[email protected]> | |
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B | |
Content-Transfer-Encoding: quoted-printable | |
Content-Type: text/plain; | |
charset=utf-8 |
This file contains hidden or 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
/* Takes a function that optionally returns a promise, and debounces it, returning a | |
* promise to all callers. When the debounced function fulfills its promise or | |
* returns a non-promise, all callers get the result. | |
* Example: http://bit.ly/1btZC4f | |
*/ | |
var debounce = function(func, wait, immediate) { | |
var timeout; | |
var deferred = $.Deferred(); | |
return function() { | |
var context = this, args = arguments; |
This file contains hidden or 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": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
This file contains hidden or 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
package main | |
import ( | |
"bufio" | |
"database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"os" | |
"reflect" | |
"strconv" |
This file contains hidden or 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; Solo freelancer's S-Corp tax optimization | |
;; | |
;; Assumes an unmarried single-shareholder and tons of other stuff. | |
;; I'm not a tax professional, no guarantees here, probably typos, etc. Come on! | |
;; Run with https://github.com/Z3Prover/z3 | |
;; | |
;; See also my notes at https://kevinlynagh.com/financial-plan/ |
OlderNewer