Skip to content

Instantly share code, notes, and snippets.

View mario21ic's full-sized avatar
👋
Open to work

Mario IC mario21ic

👋
Open to work
View GitHub Profile
@mario21ic
mario21ic / github_orgy.py
Created May 19, 2017 14:58 — forked from kootenpv/github_orgy.py
As it is impossible to find out about new repos created by an org, this awkwardly named script exists.
""" github_orgy -- monitor github organizations for new repos.
Usage:
python3.5 github_orgy.py deepmind tensorflow facebookresearch google watson-developer-cloud
Or with cron:
@hourly /usr/bin/python github_orgy.py deepmind tensorflow facebookresearch google watson-developer-cloud
"""
import time
import os
@mario21ic
mario21ic / terraform.sh
Last active May 15, 2017 20:56
Script to execute Terraform with environments and tfvars files
#!/bin/bash
# Usage: ./main.sh action [target] [params]
# ./main.sh plan
# ./main.sh plan -destroy
# ./main.sh plan vpc
# ./main.sh plan vpc -destroy
ACTION=$1
EXTRA=$*
TARGET=""
@mario21ic
mario21ic / install_terraform.sh
Created April 12, 2017 16:33
Script to install Terraform
#!/bin/sh
VERSION=$1
cd /tmp/
wget "https://releases.hashicorp.com/terraform/"$VERSION"/terraform_"$VERSION"_linux_amd64.zip"
unzip "terraform_"$VERSION"_linux_amd64.zip"
sudo cp terraform /usr/local/bin/terraform
rm -rf /tmp/terraform_$VERSION_linux_amd64.zip
echo "Terraform :: is installed successfully"
@mario21ic
mario21ic / hashicorp.sh
Created April 12, 2017 16:24 — forked from afym/ hashicorp.sh
Install hashicorp tools in an easy way (terraform, packer, ...)
#!/bin/sh
TOOL_NAME=$1
ZIP_URL=$2
mkdir /tmp/$TOOL_NAME
cd /tmp/$TOOL_NAME
curl -sS $ZIP_URL > $TOOL_NAME.zip
unzip $TOOL_NAME.zip
sudo cp $TOOL_NAME /usr/local/bin/$TOOL_NAME
rm -rf /tmp/$TOOL_NAME
echo "$TOOL_NAME :: is installed successfully"
@mario21ic
mario21ic / function.js
Created April 5, 2017 22:16 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@mario21ic
mario21ic / Jenkinsfile
Created April 5, 2017 15:39 — forked from cyrille-leclerc/Jenkinsfile
Jenkinsfile - game-of-life - aws beanstalk
#!groovy
docker.image('cloudbees/java-build-tools:0.0.6').inside {
checkout scm
def mavenSettingsFile = "${pwd()}/.m2/settings.xml"
stage 'Build'
wrap([$class: 'ConfigFileBuildWrapper',
@mario21ic
mario21ic / nginx.conf
Created March 29, 2017 22:33 — forked from cpswan/nginx.conf
Using nginx to proxy to an AWS ELB
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http{
sendfile on;
@mario21ic
mario21ic / addhosts.sh
Created February 28, 2017 13:56
Script to add hosts into /etc/hosts from source file
#!/bin/bash
IP=$1
LINE_RESULT=$IP" "
while read line; do
LINE_RESULT=$LINE_RESULT" "$line
done < $2
sudo echo $LINE_RESULT >> /etc/hosts
@mario21ic
mario21ic / .vimrc
Created February 23, 2017 15:14
Configuration personal of vim based in https://github.com/fisadev/fisa-vim-config
" ============================================================================
" Vim-plug initialization
" Avoid modify this section, unless you are very sure of what you are doing
let vim_plug_just_installed = 0
let vim_plug_path = expand('~/.vim/autoload/plug.vim')
if !filereadable(vim_plug_path)
echo "Installing Vim-plug..."
echo ""
silent !mkdir -p ~/.vim/autoload

Keybase proof

I hereby claim:

  • I am mario21ic on github.
  • I am mario21ic (https://keybase.io/mario21ic) on keybase.
  • I have a public key whose fingerprint is 4C41 EF0F 7FC2 73AE 7AD6 DE28 9DCF 4860 704D 32C0

To claim this, I am signing this object: