Skip to content

Instantly share code, notes, and snippets.

@sosedoff
sosedoff / opentable_client.rb
Last active September 15, 2020 14:46
OpenTable API Client - Visit http://opentable.herokuapp.com for details
require "faraday"
require "faraday_middleware"
module OpenTable
class Error < StandardError ; end
module Request
API_BASE = "http://opentable.herokuapp.com"
def connection
@sosedoff
sosedoff / Gemfile
Created July 27, 2012 05:12
Travis build notifications for Apple Notification Center
source :rubygems
gem 'terminal-notifier'
gem 'pusher-client', :git => 'git://github.com/pusher/pusher-ruby-client.git'
@sosedoff
sosedoff / net_ssh_session.rb
Created October 30, 2012 06:08
Net::SSH::Session experiments
require 'net/ssh'
require 'net/ssh/shell'
require 'open3'
module Net
module SSH
class SessionCommand
attr_reader :command, :output, :exit_code
# Initialize a new session command
@sosedoff
sosedoff / __readme.md
Created November 23, 2012 19:30 — forked from jimeh/__readme.md
Let's not localize programming languages. Please >_<

Let's not localize programming languages. Please >_<

Feel free to fork and expand and/or add more languages as an example to why this would be horrible, and I'll add them here :)

@sosedoff
sosedoff / squid.conf
Created December 14, 2012 18:55
Squid clean configuration
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl localhost src 192.168.0.0/16 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
@sosedoff
sosedoff / rails_logs.go
Created June 25, 2013 00:51
Capture IPs from heroku log drain
package main
import (
"fmt"
"os"
"bufio"
"regexp"
)
var IP_REGEX = regexp.MustCompile(`([\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3})`)
@sosedoff
sosedoff / gem-version.go
Last active December 25, 2015 14:49
Terminal tool to quickly check gem versions
package main
import(
"os"
"fmt"
"net/http"
"io/ioutil"
"encoding/json"
)
@sosedoff
sosedoff / static_server.go
Last active December 25, 2015 14:58
Static server for html development.
package main
import(
"os"
"fmt"
"net/http"
"github.com/jessevdk/go-flags"
)
type ServerOptions struct {
@sosedoff
sosedoff / simplecov_parser.rb
Last active December 26, 2015 04:39
SimpleCov html coverage file parser
require "nokogiri"
class CoverageParser
attr_reader :files,
:files_count,
:coverage_percent,
:avg_hit,
:lines_total,
:lines_relevant,
:lines_missed,
@sosedoff
sosedoff / main.go
Created March 11, 2015 12:12
geoip2 golang test
package main
import (
"log"
"net"
"os"
"github.com/gin-gonic/gin"
"github.com/sosedoff/geoip2-golang"
)