- First start docker in docker
$ docker pull docker
$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --name docker-outer docker sh
- Then start an inner container, create a file there and copy it to the outer container
#!/usr/bin/env bash | |
if ! command -v jq &>/dev/null; then | |
echo "missing jq!" | |
exit 1 | |
fi | |
TMP_FILE=/tmp/kimsufi_availability | |
SECONDS_TO_CACHE=60 | |
HARDWARES=$@ |
require 'bundler/inline' | |
require 'minitest/autorun' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'http' | |
end | |
require 'http' | |
require 'cgi' |
RSpec.describe 'Testing' do | |
it 'is flagged' do | |
x = [] | |
expect { x.append(1) }.to change(x, :size) | |
end | |
end |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'rspec' | |
end | |
puts 'Ruby Version ' + RUBY_VERSION.to_s | |
puts 'RSpec version ' + RSpec::Core::Version::STRING.to_s |
class SubtractTwoInteraction | |
def self.call(number) | |
number - 2 | |
end | |
end | |
class MultiplyByInteraction | |
def self.call(number:, by:) | |
number * by | |
end |
My project .pryrc contained awesome_print load, which I do not appreciate.
require 'awesome_print'
AwesomePrint.pry!
To patch against the .pryrc, which I could not edit at the time, I created another .pryrc at my home folder (~/.pryrc
):
module Kernel
alias :old_require :require
In the early middle ages, where magic reigns and the dragons breath, the world nearly came to an end if not by the bravery of the mightiest wizards.
Those, who do their magic writing lines of gibberish language may now save the humanity, but not without a social network to orchestrate their plans.
Such a crucial network shall never see the light of the day having it not the following:
function vmux --description 'Use tmux inside vagrant instance' | |
vagrant ssh -- -t 'tmux attach $@' | |
end |
function update-master --description "update master branch" | |
set __CUR_BRANCH (git rev-parse --abbrev-ref HEAD) | |
git checkout master | |
git pull | |
git checkout $__CUR_BRANCH | |
set -e __CUR_BRANCH | |
end |