This is a real pain as of writing (18 Oct 2019). I can't promise it'll work either :)
Reference
If you've been hacking around already you should do:
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |
from __future__ import absolute_import | |
from __future__ import print_function | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Activation, Flatten | |
from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
from keras.utils import np_utils | |
from scipy.special import expit | |
import numpy as np | |
np.set_printoptions(suppress=True) |
(define (script-fu-respace-tiles-addMarginSpacing inImage inLayer tileSize) | |
(let* ( | |
(margin 1) | |
(spacing 2) | |
(duplicatePadding TRUE) | |
(theWidth (car (gimp-drawable-width inLayer))) | |
(theHeight (car (gimp-drawable-height inLayer))) | |
(theMarginX (* 2 margin)) | |
(theMarginY (* 2 margin)) |
#Heroku, Ruby on Rails and PhantomJS
In this post, I’m going to show you how to modify an existing Ruby on Rails app running on Heroku’s Cedar stack to use PhantomJS for screen scraping. If you’ve never heard of PhantomJS, it’s a command-line WebKit-based browser (that supports JavaScript, cookies, etc.).
Let’s get started. This is a high-level overview of the required steps:
puts "Enter latitude in decimal degrees:" | |
lat_deg = gets.to_f | |
puts "Enter longitude in decimal degrees:" | |
lon_deg = gets.to_f | |
lon_rad = (lon_deg / 180.0 * Math::PI) | |
lat_rad = (lat_deg / 180.0 * Math::PI) | |
sm_a = 6378137.0 | |
x = sm_a * lon_rad | |
y = sm_a * Math.log((Math.sin(lat_rad) + 1) / Math.cos(lat_rad)) |
(function () { | |
var scriptName = "embed.js"; //name of this script, used to get reference to own tag | |
var jQuery; //noconflict reference to jquery | |
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"; | |
var jqueryVersion = "1.8.3"; | |
var scriptTag; //reference to the html script tag | |
/******** Get reference to self (scriptTag) *********/ | |
var allScripts = document.getElementsByTagName('script'); |
initialize: -> | |
@bind 'all', @_trackPageview | |
_trackPageview: -> | |
url = Backbone.history.getFragment() | |
_gaq.push(['_trackPageview', "/#{url}"]) |