Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am rlindsgaard on github.
* I am rlindsgaard (https://keybase.io/rlindsgaard) on keybase.
* I have a public key whose fingerprint is E162 685B 5533 4AC4 1364 B716 B081 8A41 18DA 402B
To claim this, I am signing this object:
/Users/rel/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError)
from /Users/rel/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/sqlite3_adapter.rb:3:in `<top (required)>'
from /Users/rel/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/rel/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/rel/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/rel/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/rel/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_
@rlindsgaard
rlindsgaard / reverseData
Created April 21, 2013 10:55
Reverse the bytes of a NSData object
- (NSData *)reverseData:(NSData *)data {
const char *bytes = [data bytes];
int idx = [data length] - 1;
char *reversedBytes = calloc(sizeof(char),[data length]);
for (int i = 0; i < [data length]; i++) {
reversedBytes[idx--] = bytes[i];
}
NSData *reversedData = [NSData dataWithBytes:reversedBytes length:[data length]];
free(reversedBytes);
return reversedData;
Building in workspace /Users/rel/workspace/pretest-commit-plugin/work/jobs/tralala/workspace
Pre-checkout!!!
ERROR: Workspace reports paths.default as /Users/rel/tmp/jenkins-hg/hg-test-ct
which looks different than file:///Users/rel/tmp/jenkins-hg/hg-test-ct
so falling back to fresh clone rather than incremental update
$ /usr/local/bin/hg clone --rev default file:///Users/rel/tmp/jenkins-hg/hg-test-ct /Users/rel/workspace/pretest-commit-plugin/work/jobs/tralala/workspace
adding changesets
adding manifests
adding file changes
added 28 changesets with 28 changes to 3 files