Skip to content

Instantly share code, notes, and snippets.

@tarky
tarky / gist:32b61ab5136a53948b29
Created March 26, 2015 10:44
How to split git repository
http://dskd.jp/archives/46.html
@tarky
tarky / gist:80a168b14a629ea99b8c
Created March 5, 2015 11:22
When XAMPP mysql doesnt start
https://www.youtube.com/watch?v=soUDYB3cBf4
@tarky
tarky / gist:e56b7726d6af16fd00f9
Last active August 29, 2015 14:16
Tab and window of vim
split window
:sp filename → ctrl-w s
:vsp filename → ctrl-w v
:help ctrl-w
close the rest windows of the current
:only
:on
@tarky
tarky / gist:8a9b2386bd3e6971ed5c
Created March 3, 2015 14:29
ctrl + r (on pry)
cお
@tarky
tarky / gist:6123b43179e9ef7b86cf
Created March 3, 2015 14:28
dislpay history on pry
pry(main)> hist -T 30 -n
en = Entry.new
en = Entry.last
en2 = Entry.new
en2.theme_id = 1
en2.item_id = 15
en2.item_type = "Product"
en2.valid?
en2.item_type = "Movie"
en2.valid?
@tarky
tarky / gist:c53fdc1cd22dda09a81d
Created March 3, 2015 06:09
render_to_string: You can't use undescore initialized partial name. You have to put `locals:` to pass variables.
NG
message_html = render_to_string "shared/messages", messages: resource.errors.full_messages
OK
message_html = controller.render_to_string "shared/_messages", locals: { messages: resource.errors.full_messages }
@tarky
tarky / gist:da3df9ddb2c9d82dcb71
Created January 22, 2015 16:01
eq or eql or equal or be
https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/equality-matchers
in order to Strictly inspect being the same , use equal
same value and type , use eql
same value with type conversion , use be
@tarky
tarky / gist:0b2bcb4f96895a120da6
Created December 20, 2014 03:48
How to set cursor in every line
If you select multiple lines in Visual mode, pressing the key puts a virtual cursor at every line and leaves you in Normal mode.
and you should press <space> m . to color the cursor.
@tarky
tarky / gist:8cf2660ef81a35fa3cf1
Created December 11, 2014 13:03
bundle install error
bundle install
Fetching source index from http://production.cf.rubygems.org/
Resolving dependencies...
Using rake (10.3.2)
Using i18n (0.7.0.beta1)
Using json (1.8.1)
Using minitest (5.4.2)
Using thread_safe (0.3.4)
Using tzinfo (1.2.2)
Using activesupport (4.2.0.beta2)
@tarky
tarky / gist:7802a9d8d5599459eb4a
Created December 11, 2014 04:41
vagrant-opsworks output
$ rake virtualbox-build
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso
virtualbox-iso: Download progress: 0%
virtualbox-iso: Download progress: 0%
virtualbox-iso: Download progress: 0%