I hereby claim:
- I am patte on github.
- I am patte (https://keybase.io/patte) on keybase.
- I have a public key ASAoHmQ623Seu8NC-NOmTZCkhBHiFsNruXyVBpr0hSrBLQo
To claim this, I am signing this object:
namespace :figaro do | |
desc "SCP transfer figaro configuration to the shared folder" | |
task :setup do | |
on roles(:app) do | |
upload! "config/application.yml", "#{shared_path}/application.yml", via: :scp | |
end | |
end | |
desc "Symlink application.yml to the release path" | |
task :symlink do |
#!/bin/bash | |
# Generate a kubernetes secret for nginx | |
# github: patte | |
usage="generate a kubernetes secret for nginx | |
$(basename "$0") [-h] -n NAME [-c CRTPATH -k KEYPATH ] [-s] [-p HTPASSWDPATH] | |
where: | |
-h show this help text | |
-n NAME name of the secret and the generated file |
I hereby claim:
To claim this, I am signing this object:
USERNAME=patte
SSH_PUB_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ77RKQPFvL/oF0sTiNptv72z7WecByD8LBw1fXQhcXOhT1pCTplADOVuYWmuN2NVh4xO8Qk75Py8dg/XInHAX5M6qxPEwbWJvoBGhl4CgT5G1z+vdyDxLQkdW822jGK4GjhmerSWmvubTBS+zBLJ2falLjdtjsj2PlMkL4T6J6bQ6GfjuDL9rIm4ZXb6+GlgiqwuFEF0AKX4Hg6J78LiaHkb9w9cUG1j10cfv8eEmCpfm+qcDtKUCV6t2+jt69DBrFItQ+AEIqhP+d4ZgGfYslko0Kk7fOp+UVnj6GjUzJDrn3v0W+KxaDfEeEYj/Car694SRwvdsx3KxRXQomjGMkCHTgDoq0IwPClGfhTay75WKscRKm0yUWIWzsF6Rfmje81ptQveeM9azKjCnu9P177Ag6yWlDuzx3lKJnrgffbmmPSyFAL/ss0Kddh4N8AoeniRP9KyIEXmZLGMQ7Z4NEMTaCt9IG5RSy1aI14QPtiNUGq7hq9DAMjkh73LCAkJGoTIHtrH50bQnXQbpWeDEA2it0m/IWdLAQ8YacKKe16Y4vygpV9gPa9TPzdu6qW50nNhShYIFvjM3Lda5WfSg17YR4khY5xI/Q23CoZjnFAxDi5tibGQl5PL3BG5BbDXudfh3XaS+zV8XmW0vhF4VXPnmBLnMRVswZ5xfwPMnfQ== [email protected]"
useradd -s /bin/bash -G sudo -m $USERNAME
sudo -u $USERNAME mkdir /home/$USERNAME/.ssh
chmod 700 /home/$USERNAME/.ssh
echo $SSH_PUB_KEY > /home/$USERNAME/.ssh/authorized_keys
heroku redis:cli redis-NAME -a republik-api
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 *publication
//https://www.fileformat.info/info/unicode/char/0308/index.htm | |
//https://vi.stackexchange.com/questions/3557/can-i-search-for-a-unicode-combining-character-in-vim | |
const fs = require('fs') | |
const path = __dirname+'/article.md' | |
const buffer = fs.readFileSync(path) | |
const fixed = buffer.toString('utf8') | |
.replace(/a\u0308/g, 'ä') |
How to archive a repo and copy the last n commits to a new one. republik/magazine
is used as an example here.
rebase-from
git config --global alias.rebase-from '!b="$(git branch --no-color | cut -c3-)" ; h="$(git rev-parse $b)" ; echo "Current branch: $b $h" ; c="$(git rev-parse $1)" ; echo "Recreating $b branch with initial commit $c ..." ; git checkout --orphan new-start $c ; git commit -C $c ; git rebase --onto new-start $c $b ; git branch -d new-start ; git reflog expire --expire=all ; git gc --prune=all'