Skip to content

Instantly share code, notes, and snippets.

View kintoandar's full-sized avatar
✌️

Joel Bastos kintoandar

✌️
View GitHub Profile
@kintoandar
kintoandar / pyregex.py
Created September 27, 2018 12:56
pyregex
#!/usr/bin/env python
import argparse
import re
parser = argparse.ArgumentParser(description='Python regex validator.')
parser.add_argument('-r', '--regex', required=True, type=str, help='Regular expression')
parser.add_argument('-f', '--file', required=True, type=str, help='File path')
args = parser.parse_args()
@kintoandar
kintoandar / terraform_ebs_volume_attach_example.tf
Last active June 11, 2017 23:27
terraform_ebs_volume_attach_example.tf
resource "aws_instance" "box" {
ami = "ami-1234568"
instance_type = "t2.micro"
key_name = "mykey"
subnet_id = "subnet-12345678"
user_data = "${data.template_file.template.rendered}"
vpc_security_group_ids = ["sg-12345678"]
associate_public_ip_address = true
root_block_device {
@kintoandar
kintoandar / sshpass.rb
Created January 31, 2017 14:56
brew sshpass formula
require 'formula'
class Sshpass < Formula
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz'
homepage 'http://sourceforge.net/projects/sshpass'
sha256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
@kintoandar
kintoandar / busted
Last active October 28, 2016 11:07
busted
cat <<'EOF' >> ~/.tempbust
\ /
_________)) ((__________
/.-------./\\ \ / //\.--------.\
//#######//##\\ )) (( //##\\########\\
//#######//###(( (( )) ))###\\########\\
((#######((#####\\ \\ // //#####))########))
\##' `###\######\\ \)(/ //######/####' `##/
)' ``#)' `##\`->oo<-'/##' `(#'' `(
( ``\`..'/'' )
@kintoandar
kintoandar / .bumpversion.cfg
Last active August 29, 2016 16:42
fwd - The little forwarder that could
[bumpversion]
current_version = 0.1.1
commit = True
tag = True
[bumpversion:file:.bintray.json]
search = {current_version}
replace = {new_version}
[bumpversion:file:fwd.go]
#!/usr/bin/env bash
VERSION="0.3.1"
PLATFORM="darwin"
#PLATFORM="linux"
ARCH="amd64"
#ARCH="386"
wget https://releases.hashicorp.com/vault/"$VERSION"/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip -O /tmp/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip
unzip -o /tmp/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip -d /usr/local/bin/ && rm /tmp/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip
import unittest
import urllib
#URL_TO_TEST = 'https://example.com/'
URL_TO_TEST = 'https://securityheaders.com/'
class TestSecurityHeaders(unittest.TestCase):
"""
Tests for security headers based on the recommendations
from https://securityheaders.com/
#!/bin/bash
# Simple script to automate the build of RPMs
DIR='rpmbuild'
SPECFILE='*.spec'
echo "==> Cleaning $DIR"
rm -Rf ./$DIR
echo "==> Generating $DIR"
mkdir -p ./$DIR/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
### Keybase proof
I hereby claim:
* I am kintoandar on github.
* I am kintoandar (https://keybase.io/kintoandar) on keybase.
* I have a public key whose fingerprint is 36CF 8BD9 F787 5BC2 BA3C 8B09 9915 7A6E C3E7 4DC9
To claim this, I am signing this object:
@kintoandar
kintoandar / gist:4141966
Created November 25, 2012 00:55
dropbox encfs
encfs
sudo apt-get install encfs
add user to fuse group
mkdir ~/mount/sync
encfs ~/Dropbox/sync ~/mount/sync
dropbox exclude add ~/Dropbox/sync/.encfs6.xml