Skip to content

Instantly share code, notes, and snippets.

Hi Lucas.
I know that you have high-rated account on stackoverflow.
I want you to do a undelete vote for a very good and useful
question. It's really nice. I don't know why somebody deleted
it, but I want to revert it.
If you will do it, I will pay you $30 on your paypal account.
Or you can suggest another way of payment.
upstream gitlab {
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}
server {
listen 80 default_server;
server_name <change this to your FQDN>;
rewrite ^ https://$server_name$request_uri? permanent;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
@x3ro
x3ro / foo.sh
Created November 23, 2015 09:18
git submodule rewriting foo
git clone https://github.com/x3ro/automate sub &&
wget https://gist.githubusercontent.com/x3ro/6242017/raw/8fe69f096062f3f2b1858bcc816be5eb89d15535/git-rewrite-to-subfolder &&
chmod +x git-rewrite-to-subfolder &&
cd sub &&
../git-rewrite-to-subfolder
@x3ro
x3ro / git-foobar.sh
Created November 25, 2015 11:26
Script which shows other commits that touch a file introduced by the given commit
# Didn't find a good name for this yet :D
function git-foobar {
COMMITS=$(git diff-tree --no-commit-id --name-only -r --diff-filter=A $1 | \
xargs git log --pretty="%H" -- | \
uniq | \
grep --invert-match $(git rev-parse $1))
if (( $(echo -n "$COMMITS" | wc -l) > 0 )); then
echo "$COMMITS" | xargs git show --stat
fi
@x3ro
x3ro / keybase.md
Last active September 6, 2016 14:15

Keybase proof

I hereby claim:

  • I am x3ro on github.
  • I am fresskoma (https://keybase.io/fresskoma) on keybase.
  • I have a public key ASCWLW8_UfKTpsTWuji76j_UfzJ2PIRkKRKiV-tcNrpa8Ao

To claim this, I am signing this object: