Example usage:
old_accounts = Account.where("created_at < ?", 1.month.ago)
old_abandoned_trials = AbandonedTrialQuery.new(old_accounts)
old_abandoned_trials.find_each do |account|
account.send_offer_for_support| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| ffmpeg -i <infile> -ac 2 -f wav <outfile> |
To copy database from one heroku app to another -
heroku pg:backups capture [database_name]
heroku pg:backups restore $(heroku pg:backups public-url --app source_app) DATABASE_URL --app target_app
You can refer to https://devcenter.heroku.com/articles/heroku-postgres-backups for more information.
To copy database from local to heroku -
Dump your local database in compressed format using the open source pg_dump tool: PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
where myuser is your database username and mydb is the database name.
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))It's important to note that running this reset will drop any existing data you have in the application
heroku restartheroku pg:reset DATABASE (no need to change the DATABASE)heroku run rake db:migrateheroku run rake db:seed (if you have seed)One liner
| /** | |
| Taken from: http://stackoverflow.com/questions/588040/window-onload-vs-document-onload | |
| According to Parsing HTML documents - The end, | |
| The browser parses the HTML source and runs deferred scripts. | |
| A DOMContentLoaded is dispatched at the document when all the HTML has been parsed and have run. The event bubbles to the window. | |
| The browser loads resources (like images) that delay the load event. | |
| A load event is dispatched at the window. | |
| Therefore, the order of execution will be | |
| DOMContentLoaded event listeners of window in the capture phase | |
| DOMContentLoaded event listeners of document |
| using UnityEngine; | |
| using System.Collections; | |
| public class FlyCamera : MonoBehaviour { | |
| /* | |
| Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care. | |
| Converted to C# 27-02-13 - no credit wanted. | |
| Simple flycam I made, since I couldn't find any others made public. | |
| Made simple to use (drag and drop, done) for regular keyboard layout |
| # Usage: | |
| # ======== | |
| # FirebaseAdmin::Auth.verify_id_token(your_id_token) | |
| # | |
| # The method call follows the same API of the Node.js, JAVA and Python SDKs. | |
| # See https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_the_firebase_admin_sdk | |
| # Dependencies: | |
| # --------------- | |
| # gem 'activesupport' |
| #!/usr/bin/swift | |
| // DISCLAIMER | |
| // This script modifies an unencrypted file associated with the trial version of Final Cut Pro. | |
| // Under the DMCA (17 U.S.C. § 1201), this modification does not qualify as circumvention of a technological | |
| // protection measure (TPM), as it does not involve bypassing encryption, authentication, or similar protections. | |
| // Distributing this code is therefore legal under the DMCA. | |
| // This script is intended for educational and research purposes, such as exploring trial-related file structures, |