Skip to content

Instantly share code, notes, and snippets.

View silas's full-sized avatar

Silas Sewell silas

View GitHub Profile
var swagger = require('swagger-framework');
var api = swagger.Api({
path: '/pet',
description: 'Manage pets',
consumes: [
'application/json',
],
produces: [
'application/json',
require 'formula'
class RockRuntimeNode010 < Formula
homepage 'http://nodejs.org/'
url 'http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz'
sha1 '2340ec2dce1794f1ca1c685b56840dd515a271b2'
keg_only 'rock'
def install
# vi: set ft=ruby
Vagrant.configure('2') do |config|
config.vm.box = 'centos6'
config.vm.box_url = 'http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-puppet.box'
config.vm.network :forwarded_port, :host => 8153, :guest => 8153
config.vm.provision :shell, inline: <<-eof
yum clean all
@silas
silas / swagger-koa.js
Created March 10, 2014 01:56
Example Swagger Framework usage in Koa
/**
* Koa middleware for Swagger Framework.
*/
'use strict';
/**
* Initialize a new `Koa`.
*
* @param {Framework} framework
@silas
silas / README.md
Created September 15, 2014 16:11
Install dotfiles

Clone private

git clone git@github.com:silas/dotfiles.git dotfiles.git

Or public repository

git clone https://github.com/silas/dotfiles.git dotfiles.git
@silas
silas / gist:b32a41ff5e0ac22a7c94
Created September 26, 2014 13:32
Docker clean
docker-clean() {
docker rm $( docker ps -a -q ) &>/dev/null
docker rmi $( docker images -q --filter dangling=true ) &>/dev/null
}
@silas
silas / README.md
Last active August 29, 2015 14:10
Xcode iOS Empty Application
  1. Download zip from Google Drive

  2. Unzip

unzip 'Empty Application.xctemplate.zip'
  1. Copy into Xcode iOS templates directory
@silas
silas / gist:3399
Created July 31, 2008 03:53
Convert feeds into JSON
import feedparser
def json_make_normal(obj):
if type(obj) in [str, unicode, int, float, bool, dict, set, list, tuple]:
return obj
try: return dict(obj)
except: pass
try: return list(obj)
except: pass
return None
port=1463
max_msg_per_second=2000000
check_interval=3
<store>
category=default
type=buffer
target_write_size=20480
max_write_interval=1
GNU gdb Red Hat Linux (6.5-37.el5_2.2rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description