This file contains hidden or 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
# delete the line where is 'TO DELETE' | |
sed -i '/TO DELETE/ d' file.txt |
This file contains hidden or 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
#!/usr/bin/env bash | |
images=( $(docker images | awk '{ print $1 }' | sort | uniq -c | awk '{print $2}' ) ) | |
for i in "${images[@]}" | |
do | |
echo "removing superflous images for" $i | |
docker images | grep "$i" | tail -n +2 | grep -v latest | awk '{print $1 ":" $2}' | xargs docker rmi | |
done |
This file contains hidden or 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
Delayed::Job.all.each do |d| d.locked_by = nil; d.locked_at = nil; d.run_at = Time.now; d.attempts = 0; d.save! end |
This file contains hidden or 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 coreos-cloudinit -from-file /var/lib/coreos-install/user_data |
This file contains hidden or 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
# Be sure to restart your server when you modify this file. | |
# Your secret key is used for verifying the integrity of signed cookies. | |
# If you change this key, all old signed cookies will become invalid! | |
# Make sure the secret is at least 30 characters and all random, | |
# no regular words or you'll be exposed to dictionary attacks. | |
# You can use `rake secret` to generate a secure secret key. | |
# Make sure the secrets in this file are kept private |
This file contains hidden or 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
irb(main):001:0> Redmine::AccessControl.available_project_modules | |
=> [:work_package_tracking, :time_tracking, :news, :wiki, :repository, :boards, :calendar, :timelines, :documents, :meetings, :costs_module, :backlogs, :activity] |
This file contains hidden or 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
eb printenv | \ | |
tail -n +2 | \ | |
sed "s/ //" | \ | |
sed "s/ = /\"=\"/" | \ | |
sed "s/\(.*\)/\"\1\"/" | \ | |
grep -v "AWS.*KEY" | \ | |
grep -v "PARAM.*" | \ | |
sort \ | |
> environment.txt |
This file contains hidden or 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
[Unit] | |
Description=Docker Jenkins Slave | |
After=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
ExecStartPre=-/usr/bin/docker kill jenkins-slave | |
ExecStartPre=-/usr/bin/docker rm jenkins-slave | |
ExecStartPre=/usr/bin/docker pull csanchez/jenkins-swarm-slave:latest | |
ExecStart=/usr/bin/docker run --name jenkins-slave -h "coreos-01" csanchez/jenkins-swarm-slave:latest -master http://10.110.2.50/ -username linki -password ef8da0e3dbfe441d89b7f62b3d4f11bb -executors 5 -labels "docker coreos" -fsroot /home/jenkins-slave/ -name "coreos-01" |
This file contains hidden or 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 exec -it `docker ps -lq` bash |
This file contains hidden or 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
require 'openssl' | |
require 'json/jwt' | |
require 'pp' | |
token = ARGV[0] | |
private_key = OpenSSL::PKey::RSA.new(ENV.fetch('CONCIERGE_PRIVATE_KEY').gsub('.', "\n")) | |
token = JSON::JWT.decode(token, private_key) | |
pp token.to_hash |