This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
#!/app/bin/ruby | |
require 'platform-api' | |
cleardb_url = ENV['CLEARDB_DATABASE_URL'] | |
if cleardb_url.nil? || cleardb_url == '' | |
puts "Error: CLEARDB_DATABASE_URL not set" | |
exit -1 | |
end |
Often I need to display a user-provided picture in an ImageView in such a way that the whole ImageView is filled with as much of the picture possible.
This is how I do it:
var image = require('image');
Ti.Media.showCamera({
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
success: function (e) {
require "rest_client" | |
require "twitter" | |
URL = "http://www.oge.com/residential-customers/products-and-services/" + | |
"Positive-Energy-Smart-Grid/Pages/PriceSignal.aspx" | |
DATE_RE = Time.now.strftime("%A,\\s+%B\\s+%d,\\s+%Y") | |
unless ARGV.size == 4 | |
abort "USAGE: #{$PROGRAM_NAME} CONSUMER_KEY CONSUMER_SECRET " + | |
"OAUTH_TOKEN OAUTH_TOKEN_SECRET" |
#! /bin/bash | |
# Setup variables | |
USER=ericboehs | |
SSH_PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApqtopvozpyuX+ELj9a78eFY0AmU5Zl3V3l2n7XW49ZVszdJFGX6l3Lsb9tZW1zNSPtt9hDzh7m4R/y0l/Qxzitk0xcQWyuIFIIifiqY2ZFgEPXKcZ/i+6E1rQL8f44eLkgIH8evTB15TPcIefbdWHlhLXn7WoG/aboC9TzLgtUG05m2Mtp8/gDYI93cZHgK9hLsuQR/iSbt3obx6id2bB4MQSjPu7wPpjVbsn6pglbbjgkE9qkERckLDAUDuFQfJRQUMjbJ01Vnp6w0D6Ffg8kE3VFnBxNc4eZHS/nvPTTd35ZhCnnOIQ5brfTAoMpvctlfoh0fjaWhXJbny39CHow== [email protected]" | |
GITHUB_USER=$USER | |
GITHUB_KEY=abcdefg # <---- CHANGE ME | |
# Create an admin and rvm group | |
/usr/sbin/groupadd admin |