from DevOps team {rduplain,mattd,teebes}, to mobile developers at WillowTree Apps
#!/usr/bin/env ruby | |
# Notify hubot when someone pushes. | |
require 'net/http' | |
branches = [] | |
cnum = 0 | |
STDIN.each do |line| | |
(oldref, newref, refname) = line.split | |
branches.push `git rev-parse --symbolic --abbrev-ref #{refname}`.chomp |
"Build a road-trip curated mp3 directory of a podcast." | |
# Developed against feedparser v5.1.2 and BeautifulSoup v3.2.1. | |
# pip install feedparser BeautifulSoup | |
import datetime | |
import re | |
import time | |
import urllib |
Ron DuPlain - PyOhio 2013
This is a demonstration of the Python [code][1] module, which allows for an interactive interpreter to be embedded into a Python program.
Convenience function to run a read-eval-print loop. This creates a new instance
of [InteractiveConsole
][2] and sets readfunc to be used as the
// example of how to hide data in LSB of colors within a lossless png | |
package main | |
import ( | |
"errors" | |
"flag" | |
"fmt" | |
"image" | |
"image/color" | |
"image/png" |
Linode's NodeBalancer assumes (as of Apr 2015) that a 500 response means that the node should be removed from rotation. Naturally, exceptions happen, so this is a very serious design limitation for any application which allows its code to have uncaught exceptions. I have opened a support ticket, with discussion copied here.
Ultimately, we had to rewrite our 500 responses to a non-50x response, which is strange to our application, but at least the change was limited to an nginx config and a single line of JavaScript to handle our status code as a server error. Linode specifically advised to use a non-50x response. All we need is a configuration in the NodeBalancer to not use passive checks on 500 Internal Server Error responses. There is no such configuration.
Due to the head-scratching nature of this configuration, we used 418 I'm a teapot
in place of 500 responses. In nginx:
proxy_intercept_errors on;
error_page 500 =418 /_error/internal-serve
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
(ns some-project.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [cljs.nodejs :as nodejs] | |
[cljs.core.async :as a :refer [put! <! chan alts! timeout]])) | |
(nodejs/enable-util-print!) | |
(def -main (fn [] nil)) | |
(set! *main-cli-fn* -main) | |
(def spawn (.-spawn (js/require "child_process"))) |