Public Gists by ichverstehe

Gravatar
Sun Nov 22 12:08:35 -0800 2009
1
2
3
case headers['Accept']
when 'application/json':
  ...
gist: 238324 freeswitcher: inbound/outbo...
Gravatar
Wed Nov 18 14:21:34 -0800 2009
1
2
3
require 'fsr'
require 'fsr/listener/inbound'
gist: 217534 bootstrap ruby + rubygems o...
Gravatar
Sat Oct 24 05:59:02 -0700 2009
1
2
3
#!/bin/sh
 
apt-get update
gist: 210844 config.gem => .gems
Gravatar
Thu Oct 15 02:18:32 -0700 2009
1
Rails.configuration.gems.map { |gem| "#{gem.name} #{%(--version '#{gem.requirement.to_s}') if gem.requirement} #{%(--source #{gem.source}) if gem.source}".rstrip }.join("\n")
Gravatar
Thu Sep 24 05:03:17 -0700 2009
1
2
3
freeswitch@internal> 2009-09-24 12:00:00.8122 [NOTICE] switch_channel.c:602 New Channel sofia/external/unknown@129.142.224.250 [c89c70c2-a901-11de-8545-e50cdff4e50a]
2009-09-24 12:00:00.8122 [DEBUG] sofia.c:3302 Channel sofia/external/unknown@129.142.224.250 entering state [received][100]
2009-09-24 12:00:00.8122 [DEBUG] sofia.c:3309 Remote SDP:
Gravatar
Tue Sep 15 10:35:45 -0700 2009
1
2
config-one / one: RSS 22M
config-all / all: RSS 23M
Gravatar
Thu Aug 27 07:03:22 -0700 2009
1
2
3
def session_initiated
  set("foo", "bar") {}
  # @queue: [Proc{}]
Gravatar
Mon Aug 24 07:30:37 -0700 2009
1
2
3
require 'rubygems'
require 'isaac'
 
Gravatar
Fri Aug 07 13:16:54 -0700 2009
1
2
3
class SetContentTypeCharSet
  def initialize(app)
    @app = app
Gravatar
Thu Aug 06 04:41:22 -0700 2009
1
2
3
class Array
  def >> obj
    ArrayMover.new delete(obj)
Gravatar
Thu Jul 30 09:04:57 -0700 2009
1
2
3
# This is our base controller, much like ApplicationController in Rails
class App < Sinatra::Base
  # Default settings that should be shared by all controllers
Gravatar
Tue Jul 28 13:22:47 -0700 2009
1
2
3
19:05 < harryv> nice. trying to restore nancie :)
19:24 < cypher23> harryv, why? what happened to her?
19:36 < harryv> cypher23: I rebuild my slice and in that process killed the config and made no backup :P
Gravatar
Thu Jun 04 05:40:03 -0700 2009
1
2
3
<html>
  <head>
    <script type="text/javascript">
Gravatar
Sat May 30 15:17:37 -0700 2009
1
2
3
get '/:foo' do
  if request.xhr?
    ...
gist: 120525 minimal sinatra rackup
Gravatar
Sat May 30 08:00:02 -0700 2009
1
2
3
require 'sinatra'
 
get '/' do
Gravatar
Tue May 26 08:20:58 -0700 2009
1
2
3
mc = class << self; self; end
mc.send :define_method, :__my_method, &block
 
Gravatar
Fri May 15 11:27:29 -0700 2009
1
2
3
---
twitter:
  password: xxxx
Gravatar
Mon Apr 13 14:31:21 -0700 2009
1
2
3
# Classical top-style apps and Sinatra::Default has a bunch of useful
# default settings not found in Sinatra::Base:
#
Gravatar
Wed Apr 01 01:54:09 -0700 2009
1
2
3
#! /usr/bin/env ruby
 
# this program will give you a 'named screen' (ns) command that will create
Gravatar
Tue Mar 31 14:59:28 -0700 2009
1
2
3
require 'rest_client'
 
class Unfuddle < Sinatra::Base