Skip to content

Instantly share code, notes, and snippets.

# Add the remote, call it "upstream":
git remote add upstream https://github.com/whoever/whatever.git
# Fetch all the branches of that remote into remote-tracking branches,
# such as upstream/master:
git fetch upstream
# Make sure that you're on your master branch:
This file has been truncated, but you can view the full file.
<ffd8ffe0 00104a46 49460001 01000001 00010000 ffe10058 45786966 00004d4d 002a0000 00080002 01120003 00000001 00010000 87690004 00000001 00000026 00000000 0003a001 00030000 00010001 0000a002 00040000 00010000 0640a003 00040000 00010000 04b00000 0000ffdb 00430001 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 010101ff db004301 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 ffc00011 0804b006 40030111 00021101 031101ff c4001f00 00010501 01010101 01000000 00000000 00010203 04050607 08090a0b ffc400b5 10000201 03030204 03050504 04000001 7d010203 00041105 12213141 06135161 07227114 328191a1 082342b1 c11552d1 f0243362 7282090a 16171819 1a252627 28292a34 35363738 393a4344 45464748 494a5354 55565758 595a6364 65666768 696a7374 75767778 797a8384 85868788 898a9293 94959697 98999aa2 a3a4a5a6 a7a8a9aa b2b3b4b5 b6b7b8b9 bac2c3c4 c5c6c7c8 c9cad2

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

tzhbami7@jack-black:~/Code/rails/agricircle$ bundle exec rake crop_import:import
importing crops for planning
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {'responseHeader'=>{'status'=>400,'QTime'=>1},'error'=>{'msg'=>'ERROR: [doc=Crop 3] unknown field \'name_de_ac\'','code'=>400}}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">Crop 3</field><field name=\"type\">Crop</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Crop</field><field name=\"name_de_s\">Winterweizen</field><field name=\"with_crop_stages_b\">true</field><field name=\"name_de_ac\">Winterweizen</field><field name=\"name_de_dynamic\">Winterweizen</field></doc></add>"
Backtrace: /home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute'
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 2
@tzhbami7
tzhbami7 / gist:26cdba6e3b841d5d0c39
Created April 17, 2015 10:02
Ruby Gem libv8 on OSX 10.10.3
bundle config build.libv8 --with-system-v8
@tzhbami7
tzhbami7 / counter-v2.js
Created August 4, 2015 10:49
EmberJS CountDown with Ember.run.later()
import Ember from 'ember';
export default Ember.Object.extend({
interval: function() {
return 10; // Time between polls (in ms)
}.property().readOnly(),
totalTime: function() {
return 5000; // Total Time (in ms)
}.property(),
[101] pry(main)> serialport.gets.chomp
=> "\xC0\x01@\x00\xC0=\xFF\xBD\xFF\x95\xFF\x16\xFF\xD5\xFF\xE6\x00\x00\xFD\xAC\x02$?\xAC\xF8\xFFF\x00\x1E\x00\xC0\xFD\xC0\xFE\x00=\x00;\xFF\xFB\x002\xFF\xA0\xFF\xE3\xFF\xEE\xFDL\xFD\xC8?t\xFA\xFF@\x00\xE4\xFF\x00\xA3n*\x9B\v\b\xE0\a8\v\xBF\t\x18\tW\b\xC0\b\x98\bK"
tzhbami7@john-DS8229KKS:~$ rbenv install rbx-2.5.8
Downloading rubinius-2.5.8.tar.bz2...
-> https://dqw8nmjcqpjn7.cloudfront.net/d6b411732aa035865f2855845abe5405119560f0979062672d576601de89e59a
Installing rubinius-2.5.8...
BUILD FAILED (Ubuntu 15.04 using ruby-build 20150719-13-g86919c8)
Inspect or clean up the working tree at /tmp/ruby-build.20150915094519.3730
Results logged to /tmp/ruby-build.20150915094519.3730.log
@tzhbami7
tzhbami7 / gist:1327359
Created October 31, 2011 12:11
Server log using create()
Started POST "/baan_imports" for 127.0.0.1 at 2011-10-31 12:43:31 +0100
Processing by BaanImportsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"0b/AodvncerrLMJgxiS6NCF5lR02bLwGaehpYzEkQQQ=", "baan_import"=>{"baan_upload"=>#<ActionDispatch::Http::UploadedFile:0x007fb682bcaf08 @original_filename="11-08-14-export.csv", @content_type="text/csv", @headers="Content-Disposition: form-data; name=\"baan_import[baan_upload]\"; filename=\"11-08-14-export.csv\"\r\nContent-Type: text/csv\r\n", @tempfile=#<File:/var/folders/bv/hz70f7255hv00p9cq0tctwm40000gn/T/RackMultipart20111031-41084-rwz4we>>}, "commit"=>"Upload"}
SQL (31.4ms) describe `roles_users`
User Load (1.4ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
SQL (0.2ms) BEGIN
SQL (3.2ms) describe `baan_imports`
AREL (0.4ms) INSERT INTO `baan_imports` (`baan_import_group_id`, `importing_date`, `created_at`, `updated_at`, `baan_upload_file_name`, `baan_upload_content_type`, `baan_upload_file_size`, `baan_up