Skip to content

Instantly share code, notes, and snippets.

View flomotlik's full-sized avatar

Florian Motlik flomotlik

View GitHub Profile
@flomotlik
flomotlik / Gemfile
Last active April 6, 2021 13:17
Puma on Heroku
gem 'foreman'
gem 'puma'
phpunit -d xdebug.max_nesting_level=250
# or
echo "xdebug.max_nesting_level=250" >> ~/.phpenv/versions/$php_version/etc/php.ini
mkdir .casperjs
cd .casperjs
wget --retry-connrefused -q -O - https://codeload.github.com/n1k0/casperjs/legacy.zip/1.1-beta1 > casperjs.zip
unzip casperjs.zip
mv n1k0-casperjs*/* ./
cd ..
# Add .casperjs to the beginning of the path so it takes 1.1-beta1
export PATH=/home/rof/clone/.casperjs/bin:$PATH
@flomotlik
flomotlik / create_ami.rb
Created September 12, 2013 09:01
Create AMI
# Create an Amazon EC2 AMI
ec2 = AWS::EC2.new(
:access_key_id => ENV['AWS_KEY'],
:secret_access_key => ENV['AWS_SECRET_KEY'])
ec2.images.create(:instance_id => instance_id)
@flomotlik
flomotlik / start_server.rb
Created September 12, 2013 08:50
Setting up our Amazon machines
# Creating the EC2 Instance
instance = ec2.instances.create(
:image_id => "ami-7739b41e",
:instance_type => 'cc2.8xlarge',
:key_name => "CloudshipCreateServerKey",
:instance_initiated_shutdown_behavior => 'terminate',
:block_device_mappings => {
"/dev/sda1" => {
:volume_size => 50,
@flomotlik
flomotlik / gist:6212725
Last active November 13, 2017 18:46
Wget Curl comparison and our Approach

We have changed our check_url implementation from curl to wget for three reasons

  1. It gives us the ability to retry on connection refused. Compare the command we used previously with curl:
curl -sSfL --retry 3 URL

to the current one:

@flomotlik
flomotlik / gist:6126313
Created July 31, 2013 21:22
Install casperjs development into virtual machine
mkdir casperjs1.1
cd casperjs1.1
wget https://codeload.github.com/n1k0/casperjs/legacy.zip/1.1-beta1
unzip 1.1-beta1
export PATH=~/clone/casperjs1.1/n1k0-casperjs-cd1fab5/bin:$PATH
casperjs --version
cd ..
@flomotlik
flomotlik / gist:5709952
Last active December 18, 2015 02:18
Exported Commit variables
'CI' => true,
'CI_BUILD_NUMBER' => id,
'CI_BUILD_URL' => project_build_url(project, self),
'CI_PULL_REQUEST' => false,
'CI_BRANCH' => branch,
'CI_COMMIT_ID' => commit_id,
'CI_COMMITTER_NAME' => name,
'CI_COMMITTER_EMAIL' => email,
'CI_COMMITTER_USERNAME' => github_username,
'CI_MESSAGE' => message,
require 'coveralls/rake/task'
Coveralls::RakeTask.new
repo_token: YOUR_COVERALLS_TOKEN