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
-- New SuperDirt effects in Tidal 1.0.11 | |
-- https://github.com/musikinformatik/SuperDirt/blob/develop/library/default-effects-extra.scd | |
-- https://github.com/tidalcycles/Tidal/blob/master/src/Sound/Tidal/Params.hs | |
let p = s "arpy*4" | |
{- | |
Waveloss | |
Divides an audio stream into tiny segments, using the signal's | |
zero-crossings as segment boundaries, and discards a fraction of them. |
# 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' |
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.
/** | |
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 |
-- https://tidalcycles.org/index.php/Custom_OSC | |
:set -XOverloadedStrings | |
:set prompt "" | |
:set prompt-cont "" | |
import Sound.Tidal.Context | |
superDirt <- startTidal (superdirtTarget {oLatency = 0.1, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cFrameTimespan = 1/20}) |
=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') |
/// <summary> | |
/// Instructions | |
/// - Create a Timeline asset. Add 3 tracks to it. | |
/// - Create empty GameObject in scene. Attach this script to the GameObject. Then attach a PlayableDirector component to it. | |
/// Drag and drop the Timeline asset you created into the Playable field of the PlayableDirector. | |
/// - Hit Play. The 1, 2 and 3 keys on your keyboard mute the first, second and third tracks respectively. | |
/// </summary> | |
using System.Collections; | |
using System.Collections.Generic; |
ffmpeg -i <infile> -ac 2 -f wav <outfile> |
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 |