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
# Using the `--exlude-table-data` argument for the `heroku pg:pull` command doesn't seem to be working. | |
# Instead we're going to copy the Heroku PG database by using the Postgres `pg_dump` and `pg_restore` commands. | |
# Get the "Connection info string" for myapp | |
heroku pg:credentials:url DATABASE_URL -a myapp | |
# Download the database, excluding the `visits` and `ahoy_events` table data. | |
pg_dump "<PASTE_CONNECTION_INFO_STRING_HERE>" --exclude-table-data visits --exclude-table-data ahoy_events -O -x -Fc -f without_vists_and_ahoy_events.out -v | |
# In myapp, setup an empty database |
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
{"status":500,"error":"Internal Server Error","exception":"#\u003cActionView::Template::Error: undefined method `new_admin_booking_path' for #\u003c#\u003cClass:0x007fcf77e72e50\u003e:0x007fcf77e6a3e0\u003e\u003e","traces":{"Application Trace":[{"id":80,"trace":"appsignal (1.1.5) lib/appsignal/rack/rails_instrumentation.rb:15:in `call'"}],"Framework Trace":[{"id":0,"trace":"actionpack (5.0.0.beta3) lib/action_dispatch/routing/polymorphic_routes.rb:216:in `polymorphic_method'"},{"id":1,"trace":"actionpack (5.0.0.beta3) lib/action_dispatch/routing/polymorphic_routes.rb:130:in `polymorphic_path'"},{"id":2,"trace":"actionview (5.0.0.beta3) lib/action_view/routing_url_for.rb:102:in `url_for'"},{"id":3,"trace":"actionview (5.0.0.beta3) lib/action_view/helpers/url_helper.rb:196:in `link_to'"},{"id":4,"trace":"/Users/richard/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/administrate-71a53e4e347f/app/views/administrate/application/index.html.erb:50:in `___sers_richard__rbenv_versions_______lib_ruby_gems____ |
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
.floatl--focused .floatl__label { | |
color: hsl(201, 73%, 54%); | |
} | |
.floatl--active { | |
.floatl__input { | |
padding: 1.4em 1em .6em 1em; | |
} | |
} |
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
function rp() { | |
cd ~/Projects/$1 | |
tab bin/rails s --bind 127.0.0.1 | |
tab bundle exec guard | |
clear | |
mate . | |
git status | |
} |
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 Variants | |
@mixin bg-variants($filename, $path: '/online/', $extension: 'jpg') { | |
background-image: url(#{$path + $filename + '.small.' + $extension}); | |
@include hidpi(1.5) { | |
background-image: | |
url(#{$path + $filename + '.small@2x.' + $extension}), | |
url(#{$path + $filename + '.small.' + $extension}); |
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 Parallax | |
options = | |
velocity: 15 | |
constructor: -> | |
@imgs = ($ '.parralax img') | |
@offset = 0 | |
@prepareImages() | |
@bindListeners() |
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
def self.update(username, &block) | |
BW::HTTP.get("#{Constants::API_endpoint}/events/#{username}") do |response| | |
if response.ok? | |
events = BW::JSON.parse(response.body) | |
::Event.delete | |
events.each { |e| | |
eventdata = e.each_with_object({}){ |(k,v), h| h[k.to_sym] = v } | |
eventData.each { |k,v| eventData.delete(k) if v.nil? } | |
::Event.create(eventData) |
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
/* | |
* HTML5 ✰ Boilerplate | |
* | |
* What follows is the result of much research on cross-browser styling. | |
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, | |
* Kroc Camen, and the H5BP dev community and team. | |
* | |
* Detailed information about this CSS: h5bp.com/css | |
* | |
* ==|== normalize ========================================================== |
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.Password = class Password | |
constructor: (passphrase) -> | |
@strength = @calcStrength passphrase.length | |
calcStrength: (len) -> | |
len-- | |
if len / 3 > 10 # everything with a length-1 > 30 gets a strength of 10 | |
10 | |
else |
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
;------------------------------------------------------------------------------ | |
; Mobile screen sizes | |
;------------------------------------------------------------------------------ | |
"mobile" | |
"iPhone" 320 480 pixels 163 dpi RGB 8 1.0 white "none" | |
"iPhone - Retina" 480 960 pixels 326 dpi RGB 8 1.0 white "none" | |
"iPad (portrait)" 768 1024 pixels 132 dpi RGB 8 1.0 white "none" | |
"iPad (landscape)" 1024 768 pixels 132 dpi RGB 8 1.0 white "none" |
NewerOlder