Skip to content

Instantly share code, notes, and snippets.

carles san agustin carlessanagustin

Block or report user

Report or block carlessanagustin

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
carlessanagustin /
Last active Jun 19, 2018 — forked from Tristor/
Simple IPtables script for an OpenVPN server
# Flushing all rules
iptables -F FORWARD
iptables -F INPUT
iptables -F OUTPUT
iptables -X
# Setting default filter policy
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
carlessanagustin /
Last active Mar 7, 2018 — forked from drAlberT/
UFW Cheatsheet

UFW cheat sheet


ufw [--dry-run] enable|disable|reload
ufw [--dry-run] default allow|deny|reject [incoming|outgoing]
ufw [--dry-run] logging on|off|LEVEL
    toggle logging. Logged packets use the LOG_KERN syslog facility. Systems configured for rsyslog
    support may also log to /var/log/ufw.log. Specifying a LEVEL turns logging on for the specified LEVEL.
View ansible-lineinfile-examples.yml
## credit:
- hosts: alpine_install
user: root
# - name: create a complete empty file
# command: /usr/bin/touch /test/test.conf
- name: create a new file with lineinfile
carlessanagustin /
Last active Dec 7, 2016 — forked from fernandoaleman/gist:5083680
VAGRANT: How to update VirtualBox Guest Additions with Vagrant
  • In host machine ($ )
vagrant init centos/7
vagrant up
vagrant ssh
  • In guest machine ([vagrant@localhost ~]$ )
carlessanagustin / tmux-cheatsheet.markdown
Last active Oct 7, 2019 — forked from MohamedAlaa/tmux-cheatsheet.markdown
TMUX: tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
carlessanagustin / etc_hosts.yml
Last active Jun 7, 2018 — forked from rothgar/main.yml
ANSIBLE: Generate /etc/hosts with Ansible from
View etc_hosts.yml
- hosts: all
gather_facts: yes
- name: Update /etc/hosts
become: true
- dns
dest: /etc/hosts
import scrapy
import peewee
import re
import urllib
import cStringIO
from PIL import Image
from playhouse.db_url import connect
db = connect('mysql://root:@')
carlessanagustin /
Last active Feb 28, 2018 — forked from LeCoupa/
Bash CheatSheet for UNIX Systems

#!/usr/bin/env bash

0. Shortcuts.

CTRL+A  # move to beginning of line
CTRL+B  # moves backward one character
CTRL+C  # halts the current command
CTRL+D  # deletes one character backward or logs out of current session, similar to exit
CTRL+E  # moves to end of line
carlessanagustin /
Created Feb 29, 2016 — forked from Kartones/
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

You can’t perform that action at this time.