These steps can be done through the AWS Web Panel and choosing the Launch Instance wizard :
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npage = Nokogiri::HTML(html) | |
| h[:text] = Loofah.fragment(npage.search('.displaytext').to_html).to_text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sector.all.each do |sector| | |
| files = Dir.glob("./**/skift/#{sector.slug}.png").reject{|f| f =~ /-blue\.\w{3,4}$/} | |
| files.each do |fname| | |
| cmd = "convert #{fname} -fill '#2b74a5' +opaque darkblue #{fname}" | |
| puts cmd | |
| `#{cmd}` | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "always_show_minimap_viewport": true, | |
| "auto_complete_commit_on_tab": true, | |
| "auto_find_in_selection": true, | |
| "binary_file_patterns": | |
| [ | |
| "*.log", | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "keys": ["shift+tab"], "command": "move", "args": {"by": "characters", "forward": true} | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET @field_name = "place_of_service"; | |
| SET @tablename = "payments"; | |
| SET @query = CONCAT('SELECT ', @field_name, ', count(1), length(', @field_name, ') AS lt FROM ', @tablename,' GROUP BY ', @field_name, ' ORDER BY lt desc'); | |
| PREPARE stmt FROM @query; | |
| EXECUTE stmt; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Needed files: | |
| # - Rakefile | |
| # - Gemfile | |
| # - spec/spec_helper | |
| ##### | |
| ## Gemfile | |
| source 'https://rubygems.org' | |
| gem 'rspec' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stores.each do |store| | |
| if country == store[:name] | |
| store_id = store[:id] | |
| break | |
| end | |
| end | |
| # http://ruby-doc.org/core-1.9.3/Enumerable.html | |
| ### With #select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| `wp_terms`.`slug` AS wordpress_category, | |
| COUNT(1) AS post_count, | |
| SUM(`google_stats`.`Visits`) AS total_visits, | |
| SUM(`google_stats`.`New Visits`) AS total_new_visits, | |
| ROUND((SUM(`google_stats`.`Visits`) / COUNT(1)), 1) AS visits_per_post | |
| FROM `wp_posts` | |
| INNER JOIN `wp_term_relationships` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First | |
| # http://unix.stackexchange.com/questions/46948/how-to-make-duplicates-with-different-names-from-a-single-file | |
| mkdir copies | |
| newnames=("a" "b" "c" "d" "e") | |
| orgfile=my_original_doc.pdf | |
| for x in "${newnames[@]}"; do | |
| cp $orgfile "copies/$x.pdf" | |
| done |