This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ranges(array_of_hours) | |
ranges = array_of_hours.map do |hour| | |
(hour..hour) | |
end | |
ranges = ranges.sort_by {|r| r.first } | |
*outages = ranges.shift | |
ranges.each do |r| | |
lastr = outages[-1] | |
if lastr.last >= r.first - 1 | |
outages[-1] = lastr.first..[r.last, lastr.last].max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --restart=unless-stopped elasticsearch:6.8.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h = function(selector){ | |
document.querySelectorAll(selector).forEach(function(el){ el.style.display = 'none' }) | |
} | |
var s = function(selector){ | |
document.querySelectorAll(selector).forEach(function(el){ el.style.display = 'block' }) | |
} | |
var pathContains = function(text){ | |
return window.location.pathname.indexOf(text) !== -1 | |
} | |
setInterval(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Senior (enterprise) | |
mid UX and SEO knowledge | |
Analyses and profile an application for performance and memory issues | |
Analyses and profile an application for security issues | |
Tune a production deployment | |
Understand and use Design Patterns (explain what they are, know some basic patterns) | |
Mentoring skills | |
Communication skills | |
Planning and Estimation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker exec -it gitlab_app_1 gitlab-ctl reconfigure | |
docker exec -it gitlab_app_1 update-permissions | |
docker exec -it gitlab_app_1 chmod 2770 /var/opt/gitlab/git-data/repositories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=admin --restart=unless-stopped -d --name couchdb couchdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" | |
sudo apt-get update | |
sudo apt-get install exfat-fuse exfat-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :add_my_key_to_authorized_keys do | |
unless `cat "$HOME/.ssh/id_rsa.pub"`.empty? | |
id_rsa_pub_path = `echo "$HOME/.ssh/id_rsa.pub"`.strip | |
on roles(:all) do | |
upload! id_rsa_pub_path, "/tmp/id_rsa.pub" | |
execute 'cat /tmp/id_rsa.pub .ssh/authorized_keys | sort -u -o .ssh/authorized_keys' | |
execute 'cat .ssh/authorized_keys' | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name gitlab-runner --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/docker/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner:latest | |
docker exec -it gitlab-runner /bin/bash | |
gitlab-runner register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://install.zerotier.com | sudo bash | |
sudo cat /var/lib/zerotier-one/authtoken.secret >> ~/.zeroTierOneAuthToken | |
chmod 0600 ~/.zeroTierOneAuthToken |
NewerOlder