Skip to content

Instantly share code, notes, and snippets.

View tonyskapunk's full-sized avatar
🚀

Tony Garcia tonyskapunk

🚀
View GitHub Profile
/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4BHHBCVdACeaieNqgYMJ3rUWOHnz+pXWqWSA2j0fxiFY
PLcGu2scNNIqm6AB4caWDrXK3/MJPCsrIx5DF9axrBQvZXta/DYrs3K9DPwgoQj92kX4zrfaBWu4
xkYOBtG86gcQVAYn578+sJQONJuCfcmm0M90tbNN2OTHSZfdUbW/A29BT5hMAX/LLem4zz6I20Yb
h0nwaeKdXAfzuCrIU8CSqF4M/Pbm5sUKZEcW9Ctuaf1KpgNbakqF0aBticpgVTn/iI6MVvGFK5/L
5dvbrST8UjzPhmJI2z69Ta+XmqbvZmKNeYwLP9HggBhlswQb3QET/RKjoNz7C2uDUxEhu6mO8iMp
UmFKlsRBG/LTeh57QMsX+2Bog3PbFp6sZVYux9gQO5Og+GsrWrYr8fmIY4qughJ040KqIbcOR/6H
rKWqJDLe9zxriSzR2gg1f3dcTZeQ5oGD4Thjjph3rfp3nA7JffhMjDIASPOLuuvYeKrN+juzVlCo
13DaDlbzwzHTW23D2MQ2yyxCRor/VP4hOStwa9KR++Dzm8W84usYk8+Lp5o5dUywL1mhRwfbpo0F
lgQOgItjboN2ZbeiL/wjT2Jjluz7qOZDV8IZc0wQAeKrtD6E0B3fhtzGe0DPQRUb0EaDxijdZsZs
p6pK/PgZiKimXRVZ9eP68EIOB1c9b0r1dmEHvEvoBk8r+8lUVV2V3wVY5RNmcfBnFN9XsqfKorfk
@tonyskapunk
tonyskapunk / secretsatan.py
Created December 28, 2017 18:41
intercambio 2017
#!/usr/bin/env python
# original: https://bitbucket.org/davidnorth/scripts/src/tip/secret-santa.py?fileviewer=file-view-default
import sys
import random
import requests
api_endpoint = "https://api.mailgun.net/v3"
api_key = ""
domain = "tonyskapunk.net"
@tonyskapunk
tonyskapunk / eat.sh
Created October 27, 2017 21:44
multiple args
eat() {
log=${1}; shift
cmd=${1}; shift
dop=( ${1} ); shift
opt=( ${1} ); shift
arg=${@}
echo "loging into ${log}"
echo "runing: ${cmd} ${opt[@]} ${arg[@]}"
${cmd} ${opt[@]} ${arg[@]}
@tonyskapunk
tonyskapunk / centos.md
Created October 13, 2017 17:29
(un)formatted

apache httpd

7

formatted

                  Apache Server Status for localhost (via ::1)

   Server Version: Apache/2.4.6 (CentOS)

   Server MPM: prefork
@tonyskapunk
tonyskapunk / centos.md
Created September 29, 2017 21:20
recap - net-tools vs iproute2

CentOS 6

netstat

==> /var/log/recap/netstat_91251696-248889.log <==               
9125-16-96_24:88:89             
Network connections             
Active Internet connections (servers and established)            
Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name    
tcp        1      1 1.1.1.1:99                  1.1.1.1:*                   LISTEN      1          26648      9359/sshd           
tcp        1      1 295.1.1.2:94                1.1.1.1:*                   LISTEN      1          29492      9116/master         
@tonyskapunk
tonyskapunk / magic.yml
Created August 24, 2017 21:38
includes in ansible
---
- debug:
msg: "magic"
...
@tonyskapunk
tonyskapunk / todo_notes.md
Last active June 9, 2017 21:18
recap defaults

Status of the defaults and next steps

  • MAILTO - used in recap(default: ""). if defined it will send an email(send_mail) to that address with a report of the run.
  • LOG_COMPRESS - used in recaplog(default: 1). add to man
  • LOG_EXPIRY - used in recaplog(default: 0). add to man, defined in recap.conf(default: 15)
  • EMAIL_ON_ERROR, EMAIL_ON_ERROR_SUBJECT, EMAIL_ON_ERROR_RECIPIENTS - defined iny recaplog(default 1). not used, needs to be removed from recaplog and recap.conf
  • USEPS - used in recap(default: yes). to be commented out in recap.conf
  • USERESOURCES - used in recap(default: yes). takes are of running the resources(run_resources_report()) which includes at leasts: uptime, free, vmstat, iostat, iotop, additional resources are included if enabled. Needs to be commented out in recap.conf
  • USESAR - used in recap(default: no). recap.conf sets it to no as well, needs to be commented out in recap.conf. - People has requested this to be turned on("yes") by default.
  • USESARR - used in recap(default: no).
@tonyskapunk
tonyskapunk / centos6_outputs.md
Last active April 28, 2017 20:50
fdisk vs parted

Facts

  • fdisk from util-linux-ng-2.17.2-12.28.el6.x86_64
  • parted from parted-2.1-29.el6.x86_64
  • /dev/xvdb 75G
  • Created 4 partitions
  • Partitions 1,2,3 part of LVM
  • Partition 1,2 on vg0
    • Created 18G LV
  • Partition 3 on vg1
    • Created 10G LV
@tonyskapunk
tonyskapunk / help.md
Last active April 3, 2017 16:09
Docker

Updating images

The way of updating images is assuming you keep images based on a TAG

Before updating images make sure there are no images without a TAG, delete any that is not making use of one, see Removing old images down below.

images=$( docker images --format '{{ $image:=split .Repository "/" }}{{ index $image 1 }}:{{.Tag}}' )
for image in ${images}; do
  docker pull ${image}
done
@tonyskapunk
tonyskapunk / testing.md
Last active March 28, 2017 22:30
Testing PREFIX
  • Test 1 - Setting a PREFIX:
root@docker:/recap# make PREFIX=/tmp/other/usr install
Installing scripts...
Installing man pages...
Installing configuration...
Installing cron job...
Installing docs...
Creating log directories...