Skip to content

Instantly share code, notes, and snippets.

💭
🤓 🍻

Thauan Zatta thauanz

💭
🤓 🍻
Block or report user

Report or block thauanz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thauanz
thauanz / ssh_config_generate.py
Created Jun 23, 2019
Generates SSH config from AWS instances
View ssh_config_generate.py
#!/usr/bin/env python
try:
import boto3
except ImportError:
print("Package boto3 not found")
env_name = input("Enter the environment variable name: ")
ec2 = boto3.client('ec2')
@thauanz
thauanz / links.txt
Created Jan 27, 2018
Some links to study English
View links.txt
@thauanz
thauanz / deploy.sh
Created Dec 5, 2016
Deployment for Marathon/Mesos
View deploy.sh
#!/bin/bash
ENVIRONMENT=$1
if [[ $ENVIRONMENT == '' ]]; then
echo "Specific ENVIRONMENT name like => ./deploy.sh production"
exit 0
fi
if [[ $IS_BUILD == '' ]]; then
@thauanz
thauanz / Dockerfile
Created Sep 6, 2016
Dockerfile for newspaper python3
View Dockerfile
FROM python:3.5
RUN apt-get install libxml2-dev libxslt-dev
RUN pip3 install newspaper3k && \
curl https://raw.githubusercontent.com/codelucas/newspaper/master/download_corpora.py | python3
@thauanz
thauanz / uninstall.sh
Created Aug 10, 2016
Remove all gems with grep
View uninstall.sh
$ gem list | grep 5.0.0 | cut -f1 -d' '
actioncable
actionmailer
actionpack
actionview
activejob
activemodel
activerecord
activesupport
railtie
View blacklist.rb
module Blacklist
extend ActiveSupport::Concern
module ClassMethods
def where_blacklist(query)
where(query)
end
end
def self.included(r)
View install-elasticsearch-centos.sh
# install missing libraries (if any)
cd ~
sudo yum update
yum install java-1.7.0-openjdk.x86_64
yum install unzip
yum install mc
yum install wget
yum install curl
# get and unpack elasticsearch zip file
View gist:0cbd759fa9063b168f7d
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 2,
View bash_profile
DULL=0
BRIGHT=1
FG_BLACK=30
FG_RED=31
FG_GREEN=32
FG_YELLOW=33
FG_BLUE=34
FG_VIOLET=35
FG_CYAN=36
You can’t perform that action at this time.