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
QoppaScriptsArchive class methodsDo: [:method| | |
|aClass aSelector browser| | |
aClass := QoppaScriptsArchive class. | |
aSelector := method selector. | |
browser := VersionsBrowser new scanVersionsOf: (aClass compiledMethodAt: aSelector) class: aClass meta: aClass isMeta category: (aClass organization categoryOfElement: aSelector) selector: aSelector. | |
((browser list first beginsWith: 'jr') or: [browser list first beginsWith: 'ck']) | |
ifTrue: [QoppaScriptsArchive2 class compile: method getSource]] |
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
mogrify -define jpeg:extent=300KB * |
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
#!/usr/bin/env ruby | |
#:set ts=2 | |
class EndedConverter | |
def endings | |
[ "\n\r", "\n", "\r" ] | |
end |
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
# Brew Formula for installing play 12 from abstraktor source | |
# available on gh gist 6317924 | |
require 'formula' | |
class Play12Custom < Formula | |
homepage 'http://www.playframework.org/' | |
url 'https://github.com/abstraktor/play1', :using => :git, :tag => '1.2.x' | |
def install | |
Dir.chdir("framework") do |
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
define([ | |
'underscore', | |
'backbone' | |
], function(_, Backbone){ | |
/** | |
* static variables | |
**/ | |
var nativeInterval = 10; |
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
# when you guessed a letter | |
# rotate("ammi://zbmanu.vhf/tulmktdmhk", "h".ord - "a".ord) | |
def rotate(str, num) | |
str.chars.map{|c| (c.ord<97) ? c: ((c.ord+num - 97)%26 + 97).chr}.join("") | |
end |
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
#!/usr/bin/env ruby | |
# this will create a new repo | |
# to be continued | |
abort "usage: create-repo <name>\nthe group git-<name> should exist" if ARGV.count != 1 | |
dirname = "%s.git" % ARGV[0] | |
groupname="git-%s" % ARGV[0] | |
domain = "timum.de" |
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
/* | |
* This View handles failing backbone requests | |
* it will display the savestate on #savemsg | |
* it will resend failed packages after a exponential increasing amount of time | |
*/ | |
window.View.SaveMsg = Backbone.View.extend({ | |
el: $("#savemsg"), | |
events: { | |
"click a.resend": "resend", |
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
namespace :db do | |
namespace :sqlseed do | |
desc "drop database and reload seeds" | |
task :load do | |
# is this what im looking for? | |
# FileList['db/seed.sql'] | |
conf = Rails.configuration.database_configuration[Rails.env] | |
system "mysql -u#{conf['username']} #{conf['database']} <<ENDMYSQL |
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 backbone-rails | |
*/ | |
(function() { | |
var _collection = Backbone.Collection; | |
Backbone.Collection = function() { | |
// I would like to use Backbone.Events on myself |