Skip to content

Instantly share code, notes, and snippets.

View arawako's full-sized avatar

José Leonel Subero Gamarra arawako

View GitHub Profile
@arawako
arawako / suma.java
Created September 1, 2022 22:51
Ejercicio resuelto del tema 3 de OpenBootcamp
public class suma {
public static void main(String[] arg) {
sum( 10, 20, 50);
}
public static void sum(int a, int b, int c) {
int resultado;
resultado = a + b + c;
System.out.println(resultado);
}
}
@arawako
arawako / gist:7f6b849d016efdafcf8bea15e360d1f4
Last active July 22, 2020 03:07
A script that using git filter-branch for cleaning and not tracking sensible data in a repository of etckeeper or any git repository
#!/bin/bash
origin=/etc
tmp=$(mktemp -d)
cp -a $origin/. $tmp
cd $tmp
linestoremove=$(sed -n '/# BEGIN section managed by ansible/,/# END section managed by ansible/p' .gitignore | sed -e '/# BEGIN section managed by ansible/d' -e '/# END section managed by ansible/d' -e 's_^/__' | xargs)
filter=$(git filter-branch -f --index-filter 2>&1 1>/dev/null "git rm -r --cached --ignore-unmatch $linestoremove" --prune-empty -- --all)
if [[ $filter != "" ]]
then
exit -1

Keybase proof

I hereby claim:

  • I am arawako on github.
  • I am arawako (https://keybase.io/arawako) on keybase.
  • I have a public key whose fingerprint is 4F02 6F57 121E BDD2 55B3 9A3A C274 7770 7970 AE27

To claim this, I am signing this object:

@arawako
arawako / make_openssl.txt
Last active April 26, 2024 16:00
Steps for compiling openssl in debian buster, testing and creating a .deb package using checkinstall
## Prepare the system
touch /etc/apt/sources.list.d/backports.list
echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list
apt update && apt -y upgrade && apt install -y build-essential git checkinstall
# Clone the Source
git clone https://github.com/openssl/openssl.git
# Compile, test and install manually
cd openssl
@arawako
arawako / sysnotify.py
Created October 4, 2016 03:40 — forked from sandromello/sysnotify.py
Telegram - sysnotify
#!/usr/bin/env python
import pika, logging, socket, yaml, marshal
from time import sleep
ACCEPTED_KEYS = ['message', 'sla_service', 'site', 'host', 'service']
def send_telegram(data, config):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', 2391))
if data['sla_service']:
@arawako
arawako / gist:dea774931f7776d151ce
Created May 13, 2014 18:30
Como insertar un namespace en el headers
Como insertar un namespace en el headers por ejemplo
<SOAP-ENV:Envelope xmlns:"http://webservice/">
La funcion setHeaders inserta xml en la etiqueta <SOAP-ENV:Header> y requiero es anexar un namespace en el envelope