Skip to content

Instantly share code, notes, and snippets.

View simi's full-sized avatar
🇨🇿

Josef Šimánek simi

🇨🇿
View GitHub Profile
@simi
simi / openttd.cfg
Created February 22, 2012 17:59
OpenTTD
[misc]
display_opt = SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|FULL_DETAIL|WAYPOINTS
news_ticker_sound = true
fullscreen = false
graphicsset =
soundsset =
musicset =
videodriver =
musicdriver =
sounddriver =
@simi
simi / output.rb
Created March 15, 2012 08:29
amistad be rake
[retro@retro amistad (master>)]❤ be rspec spec/activerecord
........................................................................................................................F..FFFFFFF.F...F.F.FFFF.....FFF.F...FFFFF.......F..FFFFFFF.F...F.F.FFFF.....FFF.F...FFFFF.....................
Failures:
1) Custom friend model it should behave like friend with parameterized models When users are created after activating amistad it should behave like a friend model when creating friendships should not approve a self requested friendship
Failure/Error: @john.approve(@jane).should be_false
expected true to be false
Shared Example Group: "a friend model" called from ./spec/support/parameterized_models.rb:8
# ./spec/support/friend_examples.rb:37:in `block (3 levels) in <top (required)>'
require 'rubypython'
RubyPython.start
sys = RubyPython.import 'sys'
sys.path
@simi
simi / test.rb
Created March 19, 2012 10:59
jimson-custom test
class TestJimsonEom < MiniTest::Unit::TestCase
include Rack::Test::Methods
attr_accessor :handler
module TestMethods
extend Jimson::Eom::Methods
method :register_user do |call|
call.attributes :email, :password
call.respond_with call.arguments
@simi
simi / admin_controllerb.rb
Created May 14, 2012 13:20
ActiveController roles
class Admin::AdminController < Admin::ApplicationController
role 'Admin'
end
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"app_id",
@"https://developers.facebook.com/docs/reference/dialogs/", @"link",
@"http://fbrell.com/f8.jpg", @"picture",
@"Facebook Dialogs", @"name",
@"Reference Documentation", @"caption",
@"Using Dialogs to interact with users.", @"description",
nil];
[_facebook dialog:@"feed" andParams:params andDelegate:self];
@simi
simi / bundle
Created March 2, 2013 11:55
bundle 2347 format
[retro@retro jimson (next *%>)]❤ bundle update
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Using blankslate (3.1.2)
Using multi_json (1.1.0)
Using rack (1.5.2)
Using mime-types (1.21)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'original.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf52.31.0
Duration: 00:00:02.36, start: 0.000000, bitrate: 1389 kb/s
Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 691 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
@simi
simi / gist:5301920
Created April 3, 2013 14:54
fulltext
Gem::Specification.new do |s|
s.name = "mongoid_fulltext"
- s.version = "0.6.1"
+ s.version = "0.6.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Aaron Windsor"]
- s.date = "2012-07-16"
+ s.date = "2013-04-03"
s.description = "Full-text search for the Mongoid ORM, using n-grams extracted from text"
@simi
simi / backup.sh
Last active December 17, 2015 22:58
backup entire mysql to s3
#!/bin/bash
# you'll need configured s3cmd and stored password for mysql in ~/.my.cnf
DIR=`pwd`
# cd $DIR
info() {
echo -e "\e[1;34m"$1"\e[0m"
}