This file contains 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
class ActiveSupport::TestCase | |
ActiveRecord::Migration.check_pending! | |
fixtures :all | |
def setup | |
puts "------ #{self.class}:#{method_name} ------" | |
Rails.cache.clear | |
self.do_setup | |
... |
This file contains 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
03333003333 | |
menu sequence: 4 2 2 4 1 |
This file contains 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
# Create this from IAM - Users - the user - Inline policies - create one - Custom Policy - paste this | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "s3:*", | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::my-bucket", |
This file contains 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
# Elaborating on https://docs.aws.amazon.com/AWSRubySDK/latest/index.html | |
Aws.config.update( | |
region: 'us-east-1', # https://docs.aws.amazon.com/general/latest/gr/rande.html | |
credentials: Aws::Credentials.new( | |
Figaro.env.s3_access_key_id, | |
Figaro.env.s3_secret_access_key | |
) | |
) | |
s3 = Aws::S3::Client.new |
This file contains 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
background: radial-gradient(ellipse farthest-corner at 50% 50% , rgba(0,0,0,0.4) 20%, rgba(0,0,0,0) 200%) |
This file contains 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
%meta(name="twitter:card" content="player") | |
%meta(name="twitter:title" content="#{@episode.safe_title} by #{@series.safe_title}") | |
%meta(name="twitter:app:name:googleplay" content="Player FM") | |
%meta(name="twitter:app:id:googleplay" content="fm.player") | |
%meta(name="twitter:description" content="#{@episode.safe_description}") | |
%meta(name="twitter:site" content="PlayerFM") | |
%meta(name="twitter:image" content="#{safe_series_image_url @episode.series}") | |
-# dev tunnel -> %meta(name="twitter:player" content="https://something-something.ngrok.com#{widget_episode_path series_id: @series.slug, id: @episode.slug}" | |
) | |
%meta(name="twitter:player" content="#{Player.routes.base_url}#{widget_episode_path series_id: @series.slug, id: @episode.slug}") |
This file contains 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
window.onbeforeunload = -> | |
if player.isPlaying() | |
"This will stop playback." |
This file contains 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
test |
This file contains 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
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead'); | |
$.get("http://twitter.com", | |
function(response) { | |
var token= response.match(/authenticity_token.*?value="(.*?)"/)[1] | |
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead'); | |
$.post("http://twitter.com/sessions", { | |
"session[authenticity_token]": token, | |
"session[username_or_email]": $("#username").val(), | |
"session[password]": $("#password").val() | |
}, function(html) { |
This file contains 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
$(".delete").live("click", function() { | |
$(this).parents("tr").prev().andSelf().remove(); | |
}); |