I hereby claim:
- I am jpinnix on github.
- I am jpinnix (https://keybase.io/jpinnix) on keybase.
- I have a public key ASDPw031JHh1g-xUF2MOinTs89eie086s-PdtV-3cEx6zgo
To claim this, I am signing this object:
class Image < ActiveRecord::Base | |
before_create, :set_width_and_height | |
has_attached_file :img, | |
:url => "/system/images/:attachment/:id/:basename.:extension", | |
:path => "#{Rails.root}/public/system/images/:attachment/:id/:basename.:extension" | |
def set_width_and_height | |
# this next line is the magic line | |
geo = Paperclip::Geometry.from_file(img.to_file(:original)) |
App details: | |
Rails 3.0.0 | |
Bundler 1.0 | |
http://github.com/challengepost/postmark-rails (fork for Rails 3) | |
Ran bundle install, everything installed correctly. Checked in Gemfile.lock and | |
added 'require "bundler/capistrano"' to deploy.rb. Works totally fine on local. | |
But on deploy it locks up when trying to init submodules: | |
No submodule mapping found in .gitmodules for path |
rake --trace | |
(in /Users/jpinnix/.vim) | |
** Invoke default (first_time) | |
** Invoke ack.vim (first_time) | |
** Execute ack.vim | |
**************************************** | |
* Installing ack.vim * | |
**************************************** |
User john: | |
ssh john@common-machine | |
screen -S pairprog | |
Ctrl-a :multiuser on | |
Ctrl-a :acladd pete | |
User pete: |
$ brew update | |
$ brew install mysql | |
$ mysql_install_db --verbose --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
$ mkdir -p ~/Library/LaunchAgents | |
$ cp /usr/local/Cellar/mysql/5.5.25a/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ | |
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
$ mysql -uroot |
# From http://nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x | |
$ brew update | |
$ brew install libxml2 libxslt | |
$ brew link libxml2 libxslt | |
$ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz | |
$ tar xvfz libiconv-1.13.1.tar.gz | |
$ cd libiconv-1.13.1 | |
$ ./configure --prefix=/usr/local/Cellar/libiconv/1.13.1 | |
$ make |
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
Follow the instructions here: The Hitchhiker's Guide to Riding a | |
Mountain Lion http://j.mp/Qm5UJD, including installing XQuartz. | |
After installing XQuartz set the correct path to the X11 library to | |
install Ruby 1.8.7-p358 with rbenv: | |
export CPPFLAGS=-I/opt/X11/include | |
then let the compiler know where gcc-4.2 is: |
#!/usr/bin/env python | |
""" | |
This script is designed to generate a simple HTML file with _all_ of your | |
Pinboard.in bookmarks. | |
You should edit the `username`, `password`, `bookmark_filename`, and `tag` | |
variables. | |
Requirements: |
I hereby claim:
To claim this, I am signing this object: