Skip to content

Instantly share code, notes, and snippets.

View jewilmeer's full-sized avatar
🚀

Jan-Willem van der Meer jewilmeer

🚀
  • jewilmeer
  • Utrecht, The Netherlands
  • 20:52 (UTC +02:00)
View GitHub Profile
#!/usr/bin/env ruby
# example: ./upgrade_heroku_database myapp-staging
if ARGV.length != 1
puts "Usage: upgrade_heroku_database <namespace>"
exit
end
namespace = ARGV[0].chomp
---
en:
accounts:
passwords:
form:
login: "Login"
submit: "Request"
sessions:
form:
forgot_your_password: "Forgot your password?"
@jewilmeer
jewilmeer / gitlab-ci-build-script.sh
Last active January 11, 2020 22:57
The build script we use at traintool.com
if ! type phantomjs; then
echo "phantomjs not installed, now installing"
cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
else
echo "phantomjs installed, continue"
@jewilmeer
jewilmeer / RubyTest.sublime-build
Created January 6, 2012 12:08
Sublime 2 with .rvmrc loading
// This file lives @ /Library/Application Support/Sublime Text 2/Packages/User/RubyTest.sublime-build
{
"ruby_unit_exec": "~/bin/rvm_ruby ruby -Itest",
"ruby_cucumber_exec": "~/bin/rvm_ruby cucumber --no-color",
"ruby_rspec_exec": "~/bin/rvm_ruby rspec",
"ruby_unit_folder": "test",
"ruby_cucumber_folder": "features",
"ruby_rspec_folder": "spec"
}
--------------------------45b6a57535ac8600
Content-Disposition: form-data; name="provider"
telegraaf
--------------------------45b6a57535ac8600
Content-Disposition: form-data; name="file"; filename="config.ru"
Content-Type: application/octet-stream
# frozen_string_literal: true
require './app'
@jewilmeer
jewilmeer / error.log
Last active December 18, 2015 05:28
log from install on ubuntu 12.10 x64 server.
added the following brightbox ppa:
ppa:brightbox/ruby-ng state=present
ppa:brightbox/passenger-experimental
installed the following packages:
- ruby1.9.3
- ruby-switch
- nginx-full
@jewilmeer
jewilmeer / environment.rb
Created January 11, 2013 11:17
Securityfix rails 2.3
# Make sure we are secure, see https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ
ActiveSupport::CoreExtensions::Hash::Conversions::XML_PARSING.delete('symbol')
ActiveSupport::CoreExtensions::Hash::Conversions::XML_PARSING.delete('yaml')
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.define :gitlab do |gitlab|
gitlab.vm.network :hostonly, "10.10.10.100"
gitlab.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
@jewilmeer
jewilmeer / jnk.rb
Created May 29, 2012 07:20 — forked from matthijsgroen/jnk.rb
Jenkins command line
#!/usr/bin/ruby
require 'net/http'
require 'net/https'
require 'base64'
require 'uri'
require 'yaml'
require 'cgi'
module Configuration
def config_file
@jewilmeer
jewilmeer / fapi
Created March 5, 2012 15:33 — forked from matthijsgroen/fapi
Fapi
#!/usr/bin/ruby
require 'net/http'
require 'net/https'
require 'base64'
require 'uri'
require 'yaml'
require 'cgi'
class Net::HTTP
alias_method :old_initialize, :initialize