Skip to content

Instantly share code, notes, and snippets.

View lichti's full-sized avatar
👨‍💻
🏊🏻🚴🏻🏃🏻

Gustavo Lichti lichti

👨‍💻
🏊🏻🚴🏻🏃🏻
View GitHub Profile
@lichti
lichti / attack.sh
Created May 13, 2015 18:58
Massive Test on HTTP or HTTPS
#!/bin/bash
ADDR=${1:-FAIL}
C=${2:-10}
N=${3:-100}
xN=0
xPROC=0
RND=$RANDOM
touch /tmp/attack_${RND}_0.pid
@lichti
lichti / json-to-yml.sh
Last active September 11, 2015 19:03
Convert json to yaml
ruby -r json -r yaml -e "json = JSON.parse(File.read('./file.json')); print YAML::dump(json)" > file.yml
@lichti
lichti / yml-to-json.sh
Created September 11, 2015 19:04
Convert yaml to json
ruby -r json -r yaml -e "yaml = YAML.load(File.read('./cloud-formation.yml')); print yaml.to_json" > cloud-formation_yml.json
@lichti
lichti / keybase.md
Last active September 21, 2015 18:37

Keybase proof

I hereby claim:

  • I am lichti on github.
  • I am lichti (https://keybase.io/lichti) on keybase.
  • I have a public key whose fingerprint is B13B 1B3E A19D E6F8 5AE5 AF55 E274 E9C4 4D79 E0EB

To claim this, I am signing this object:

@lichti
lichti / import-gpg.md
Last active September 22, 2015 03:50

Import a public key:

gpg --import public.key

Import a private key:

gpg --allow-secret-key-import --import private.key
@lichti
lichti / create-gpg.md
Last active September 22, 2015 03:51

Create a RSA keypair

gpg --gen-key

Generate a revocation certificate

gpg --gen-revoke [KEY_ID] > ~/.gnupg/revocation-[KEY_ID].crt
@lichti
lichti / Docker-NewRelic
Created October 29, 2015 03:55
Docker-NewRelic
docker run -d \
--privileged=true --name nrsysmond \
--pid=host \
--net=host \
-v /sys:/sys \
-v /dev:/dev \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/log:/var/log:rw \
-e NRSYSMOND_license_key=xxxxxxx \
-e NRSYSMOND_logfile=/var/log/nrsysmond.log \
- Configurar o nome do sistema (hostname)
sudo hostnamectl set-hostname –static "lichti-note"
- Atualizando
sudo dnf update
- Instalar Fedy
sudo bash -c 'su -c "curl http://folkswithhats.org/fedy-installer -o fedy-installer && chmod +x fedy-installer && ./fedy-installer"'
- Gnome Tweak Tool