Editing:
- Copy:
Command + C
- Cut:
Command + X
- Paste:
Command + V
- Cursor to end of line:
Command + Right Arrow
- Cursor to beginning of line:
Command + Left Arrow
# first install Hub: | |
brew install hub | |
echo 'alias git=hub' >> ~/.bash_profile && source ~/.bash_profile | |
# To submit PR from current branch to master, from current branch run: | |
git pull-request -m "message for PR" -b master |
module Components::Extensions::GroupBy | |
def group_by_two_levels(args = {}) | |
array, first, second = [args[:array], args[:first], args[:second]] | |
hash = array.group_by do |obj| | |
obj.respond_to?(first) ? obj.send(first) : obj[first] | |
end | |
hash.each do |first, obj_array| | |
hash[first] = obj_array.group_by do |obj| | |
obj.respond_to?(second) ? obj.send(second) : obj[second] |
1. Login to AWS: http://aws.amazon.com/ | |
2. Go to Cloudfront | |
3. Create Distribution | |
4. Under Web: Get Started | |
5. Origin Domain Name: example.herokuapp.com | |
6. Submit | |
7. Click into the recently created CDN and copy the "Domain Name", which will look like ddho32frg3ham.cloudfront.net | |
8. Follow steps here to setup in Rails app: https://gist.github.com/francirp/9fe05dcbcf4ffabbf0e1 | |
First, create a new Cloudfront distribution via Amazon AWS console (gist here). Once you've done that, it's as simple as adding the following to your production environment (and staging if you run a staging environment), replacing the value with your CDN host url:
config.action_controller.asset_host = "<YOUR DISTRIBUTION SUBDOMAIN>.cloudfront.net"
See here for more info: https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn#adding-cloudfront-to-rails
{ | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Predawn/predawn.tmTheme", | |
"copy_with_empty_selection": false, | |
"drag_text": false, | |
"draw_indent_guides": true, | |
"draw_minimap_border": true, | |
"enable_tab_scrolling": false, |
# Switch Pow to For Cucumber Tests | |
# See following Stack Overflow doc for context: | |
# http://stackoverflow.com/questions/10685465/rails-cucumber-capybara-selenium-pow-domains-subdomains-and-javascript | |
pow_config = "#{Rails.root}/.powenv" # Dont change, this is the Config Files Location. | |
pow_config_stash = "#{Rails.root}/.powenv_original" # This is what the config will be stashed as during testing. | |
config.before do | |
# Set the default host | |
Capybara.app_host = "http://powder.dev" | |
# Stash the existing config | |
File.rename(pow_config,pow_config_stash) if File.exists? pow_config |
all_pictures = Picture.all | |
pictures_with_source = all_pictures.find_all do |picture| | |
picture.source.present? | |
end | |
# pictures_with_source should now contain all of the pictures where the source is not empty |
1001 | |
REPEAT 4 [ FD 200 LT 45 FD 100 LT 45 FD 50 LT 45 FD 25 LT 45 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 RT 90 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 LT 45 BK 25 RT 90 FD 25 LT 45 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 RT 90 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 LT 45 BK 25 LT 45 BK 50 RT 90 FD 50 LT 45 FD 25 LT 45 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 RT 90 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 LT 45 BK 25 RT 90 FD 25 LT 45 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 RT 90 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 LT 45 RT 90 LT 45 BK 6 LT 45 BK 12 LT 45 BK 25 LT 45 BK 50 LT 45 BK 100 RT 90 FD 100 LT 45 FD 50 LT 45 FD 25 LT 45 FD 12 LT 45 FD 6 LT 45 RT 90 LT 45 BK 6 RT 90 FD 6 |