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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
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
# run with: god -c /path/to/config.god [add -D if you want to not-deamonize god] | |
# This is the actual config file used to keep the delayed_job running | |
APPLICATION_ROOT = "/var/www/application" | |
RAILS_ENV = "production" | |
God.watch do |w| | |
w.name = "delayed_job_production" | |
w.interval = 15.seconds | |
w.start = "/bin/bash -c 'cd #{APPLICATION_ROOT}/current; /usr/bin/env RAILS_ENV=#{RAILS_ENV} #{APPLICATION_ROOT}/current/script/delayed_job start > /tmp/delay_job.out'" |
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
{"response":[{"id":36,"name":"Sync Test","client_name":"Eventstream","created_at":"2015-06-25T14:16:58.943Z","updated_at":"2015-07-27T11:38:42.683Z","event_date":"06/25/2015","local_ip_address":"","local_stream_name":"","local_port":0,"live_stream_name":"synctest1","active_twitter":false,"twitter_handle":"#toronto","allow_live_streaming":false,"event_id":"SYNCTEST1","allow_event_access":true,"live_wowza_url":"http://cdn.kastio.com/livetouch","record_on_server":false,"playback_recording":false,"allow_remote_vod_streaming":true,"vod_filename":"uploads/1435241756252-jahidqqvzhbyb9-061ec137210e43cf42d4bea36a03f96f/synctest.mp4","allow_local_streaming":false,"local_protocal":"udp","local_mode":"Multicast","local_wifi_ssid":"","vod_wowza_url":"http://cdn.kastio.com/livetouch-vods3/_definst_/mp4:amazons3/livetouch-vod","vod_filename_suffix":"playlist.m3u8","single_camera_view":true,"overlay_title":"Sync Test","overlay_message":"Working Fine...!!!","overlay_date_time":"2015-07-14 19:08:00","overlay_enabled":true,"liv |
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 'mechanize' | |
mechanize_agent = Mechanize.new | |
# Visit login page | |
mechanize_agent.get('http://www.cmsimple.org/demo/?Welcome&login') do |page| | |
remote_login_form = page.form('login') | |
remote_login_form.passwd = "test" | |
# Click submit to login | |
mechanize_agent.submit(remote_login_form, remote_login_form.buttons.first) | |
# Access the protected page - Settings |
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 'rubygems' | |
require 'memcache' | |
class Memcaching | |
def initialize | |
@cache = MemCache.new 'localhost:11211', :namespace => 'goofingaroundwithmemcached' | |
end | |
def load_key_into_memcache(key,value) |
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
------------inspect exif_info.exif-------------- | |
[{:orientation=>#<EXIFR::TIFF::Orientation:TopLeft(1)>, :color_space=>1, :pixel_x_dimension=>320, | |
:pixel_y_dimension=>239}] | |
-----------inspect exif_info.gps-------------- | |
nil |
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 "redis" | |
redis = Redis.new(:host => "localhost", :port => 6379) | |
redis.set "foo", "bar" | |
redis.get "foo" |
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
#application.rb | |
# Avoid, the scanner gets auto started when device starts up. | |
# Avoid, the scanner gets auto started when application start. | |
def on_activate_app | |
begin | |
Scanner.stop | |
rescue | |
end | |
end | |
#app/layout.erb |
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
/** | |
* zig-zag background (SO) | |
* CSS Zigzag Border with a Textured Background | |
*/ | |
background: linear-gradient(#EFF0F3 49%, transparent 49%), | |
linear-gradient(-45deg, white 33%, transparent 33%) 0 50%, | |
white linear-gradient(45deg, white 33%, #EFF0F3 33%) 0 50%; | |
background-repeat: repeat-x; | |
background-size: 1px 100%, 40px 40px, 40px 40px; |
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
(function($) { | |
$.fn.tableCap = function(params) { | |
params = $.extend( {lower : false, toggle : true}, params); | |
var selectedElement = $(this); | |
toggleText = (function (convert) { | |
$('tr td',selectedElement).each(function () { | |
convert($(this).html(), $(this)) | |
}); |
OlderNewer