Skip to content

Instantly share code, notes, and snippets.

config.load_autoconfig()
config.bind('R', 'config-source ;; message-info config-reloaded')
# saner defaults
# --------------
c.auto_save.session = True
c.aliases['x'] = 'quit --save'
c.completion.shrink = False
c.input.insert_mode.auto_load = True
c.confirm_quit = ["downloads"]
@tobeportable
tobeportable / bug.md
Created January 28, 2015 14:17
rails sqlite migration bug boolean
class CreateMemberships < ActiveRecord::Migration
  def change
    create_table :memberships do |t|
      t.boolean :needs_emails, default:true
      t.belongs_to :user
      t.belongs_to :tag
      t.timestamps null:false
    end
 end
@tobeportable
tobeportable / a.md
Created October 31, 2013 11:59
upgrading docker
# docker version
Client version: 0.6.4
Go version (client): go1.1.2
Git commit (client): 2f74b1c
Server version: 0.6.4
Git commit (server): 2f74b1c
Go version (server): go1.1.2
Last stable version: 0.6.5, please update docker

Auto Synchronized Backups with Bittorrent sync & a vps

1. Cloud syncing on the cheap

Two awsome things were released yesterday :

Compare this to the pricing of : dropbox pro

[2013-04-17 00:54:56] INFO Adhearsion::Initializer: Adhearsion v2.3.1 initialized in "development"!
[2013-04-17 00:55:28] INFO Adhearsion::Router: Call bb418258-a6e8-11e2-9923-2dafca7e20c6 selected route "default" (AController)
[2013-04-17 00:55:28] DEBUG Adhearsion::Call: bb418258-a6e8-11e2-9923-2dafca7e20c6: Executing command #<Punchblock::Command::Accept headers_hash={}, target_call_id=nil, component_id=nil, target_mixer_name=nil, state_name=:new>
[2013-04-17 00:55:28] INFO Adhearsion::Call: bb418258-a6e8-11e2-9923-2dafca7e20c6: Executing controller #<AController call=bb418258-a6e8-11e2-9923-2dafca7e20c6, metadata={}>
[2013-04-17 00:55:28] INFO Adhearsion::Call: bb418258-a6e8-11e2-9923-2dafca7e20c6: Hanging up
[2013-04-17 00:55:28] DEBUG Adhearsion::Call: bb418258-a6e8-11e2-9923-2dafca7e20c6: Executing command #<Punchblock::Command::Hangup headers_hash={}, target_call_id=nil, component_id=nil, target_mixer_name=nil, state_name=:new>
[2013-04-17 00:55:28] DEBUG Adhearsion::Call: bb418258-a6e8-11e2-9923-
@tobeportable
tobeportable / description.md
Last active December 16, 2015 06:09
cf. description.md
@tobeportable
tobeportable / xm.rb
Last active December 15, 2015 20:58
xm gem source file
require "xm/version"
require 'xmpp4r'
require 'yaml'
module Xm
include Jabber
@@y = YAML.load_file(ENV['HOME']+'/.xm')
@@cl = Client.new(JID.new(@@y[:login]))
if @@y.has_key? :server
@@cl.connect(@@y[:server])
else
@tobeportable
tobeportable / README.md
Last active December 15, 2015 20:48
xm gem documentation

XM

The xm gem will help you send xm(pp) messages quickly for e.g. : logging, process notification, alerts ...

installation

gem instal xm

configuration

Create the .xm file in your ENV["HOME"] : vim ~/.xm.

Adapt-paste one of the following yaml templates.

vim /etc/apt/sources.list
#paste in
deb http://files.freeswitch.org/repo/deb/debian/ squeeze main
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
apt-get update
apt-get install freeswitch freeswitch-lang-en freeswitch-sounds
ulimit -c unlimited
touch /etc/freeswitch/freeswitch.xml
freeswitch

Gtalk

A ruby gem to send xmpp messages with a gtalk account

installation

sudo gem install gtalk

setup