Skip to content

Instantly share code, notes, and snippets.

Jason asm

Block or report user

Report or block asm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mvimg_convert.rb
#!/usr/bin/env ruby
# Tool to convert Google motion JPGs (MVIMG) to MP4 video files.
require 'exiftool'
files = Dir['*.jpg']
files.each do |file|
exif = Exiftool.new(file)
offset = exif[:micro_video_offset]
View gist:bc4df6f12d11f4be1e16c5118c27de64
### Keybase proof
I hereby claim:
* I am asm on github.
* I am abyss (https://keybase.io/abyss) on keybase.
* I have a public key ASArC-fgGr4OdvmCLnr2VqBXWS872FregIiJLPWxTuDzqAo
To claim this, I am signing this object:
@asm
asm / ati_fan_watch.rb
Created Jun 20, 2011
ATI fan controller
View ati_fan_watch.rb
#!/usr/bin/env ruby
# Quick and dirty ATI fan control script. This script will attempt to keep your
# cards around the OPTIMAL temperature within WINDOW degrees. You'll probably
# need to run this as root.
OPTIMAL = 75 # Celcius
WINDOW = 1 # Celcius
MIN_FAN = 40 # Minimum fan speed
View dm-mongo-adapter patch
diff --git a/lib/mongo_adapter/adapter.rb b/lib/mongo_adapter/adapter.rb
index 2ae35f8..51e3be3 100644
--- a/lib/mongo_adapter/adapter.rb
+++ b/lib/mongo_adapter/adapter.rb
@@ -5,6 +5,10 @@ module DataMapper
class ConnectionError < StandardError; end
+ def storage_exists?(name)
+ true
View gist:453744
diff --git a/do_mysql/ext/do_mysql/do_mysql.c b/do_mysql/ext/do_mysql/do_mysql.c
index acc3f2c..926f1a6 100755
--- a/do_mysql/ext/do_mysql/do_mysql.c
+++ b/do_mysql/ext/do_mysql/do_mysql.c
@@ -450,6 +450,7 @@ static MYSQL_RES* cCommand_execute_async(VALUE self, VALUE connection, MYSQL* db
struct timeval start;
const char* str = rb_str_ptr_readonly(query);
size_t len = rb_str_len(query);
+ MYSQL_RES* result;
View gist:184933
2009-09-10 16:55:25 DEBUG (0.000143) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei" = 'engine|20090910-chizojeha_0|0_0_0_0_0_1'
2009-09-10 16:55:25 DEBUG (0.000123) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei" = 'engine|20090910-chizojeha_0|0_0_0_0_0'
2009-09-10 16:55:25 DEBUG (0.000132) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei" = 'engine|20090910-chizojeha_0|0_0_0_0'
2009-09-10 16:55:25 DEBUG (0.000196) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei" = 'engine|20090910-chizojeha|0_0_0'
2009-09-10 16:55:25 DEBUG (0.000144) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei" = 'engine|20090910-chizojeha|0_0'
2009-09-10 16:55:25 DEBUG (0.000135) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei" = 'engine|20090910-chizojeha|0'
2009-09-10 16:55:25 DEBUG (0.000120) SELECT "fei", "wfid", "expclass", "svalue" FROM "dm_expressions" WHERE "fei
View gist:184917
concurrent_iterator :count => 10 do
cursor do
get_total
do_some_stuff
_rewind :if => '${total} < 100'
end
end
You can’t perform that action at this time.