-
Screencasts
-
Seattle Ember.js sessions
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
package main | |
import ( | |
"os/exec" | |
) | |
func main() { | |
try := []string{"xdg-open", "google-chrome", "open"} | |
for _, bin := range try { | |
err := exec.Command(bin, "http://golang.org").Run() |
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
#!/bin/bash | |
# | |
# Author: benley@gmail.com (Benjamin Staffin) | |
# Set your terminal's color palette to match the Solarized color scheme by | |
# using escape sequences. Uses OSC 4 to set colors. | |
# | |
# This will work with many terminal emulators, but not all. | |
set -o nounset |
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
sudo pg_dropcluster --stop 9.4 main && sudo pg_createcluster 9.4 main && sudo pg_ctlcluster 9.4 main start |
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
"Hi, I’d like to hear a TCP joke." | |
"Hello, would you like to hear a TCP joke?" | |
"Yes, I’d like to hear a TCP joke." | |
"OK, I’ll tell you a TCP joke." | |
"Ok, I will hear a TCP joke." | |
"Are you ready to hear a TCP joke?" | |
"Yes, I am ready to hear a TCP joke." | |
"Ok, I am about to send the TCP joke. It will last 10 seconds, it has two characters, it does not have a setting, it ends with a punchline." | |
"Ok, I am ready to get your TCP joke that will last 10 seconds, has two characters, does not have an explicit setting, and ends with a punchline." | |
"I’m sorry, your connection has timed out. Hello, would you like to hear a TCP joke?" |
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
namespace :deploy do | |
desc "Notifies Honeybadger locally using curl" | |
task :notify_honeybadger do | |
on roles(:app) do | |
require 'json' | |
require 'honeybadger' | |
begin | |
require './config/initializers/honeybadger' | |
rescue LoadError |
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
# nginx | |
description "nginx http daemon" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/usr/bin/nginx | |
env PID=/usr/local/nginx/logs/nginx.pid | |
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
require 'sinatra' | |
require 'redis' | |
require 'json' | |
require 'date' | |
class String | |
def &(str) | |
result = '' | |
result.force_encoding("BINARY") |
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
# http://forrst.com/posts/JSON_vs_Marshal_vs_eval_Which_is_the_fastest_fo-6Qy | |
require 'benchmark' | |
require 'json' | |
require 'redis' | |
# ----------------- | |
puts "Initialize variables.." |
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
[user@debian:~] 02:29:30 PM: aptitude purge libmysqlclient16 | |
The following packages will be REMOVED: | |
libmysqlclient16{p} | |
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded. | |
Need to get 0 B of archives. After unpacking 4481 kB will be freed. | |
The following packages have unmet dependencies: | |
libdbd-mysql-perl: Depends: libmysqlclient16 (>= 5.1.21-1) but it is not going to be installed. | |
The following actions will resolve these dependencies: | |
Remove the following packages: |