Skip to content

Instantly share code, notes, and snippets.

View cig0's full-sized avatar
👾
Ask me about Free Software: it's all about freedom!

Martín Cigorraga cig0

👾
Ask me about Free Software: it's all about freedom!
View GitHub Profile
postgres:
use_upstream_repo: True
version: '9.5'
pkg: postgresql
pkgs_extra: []
pkg_client: postgresql-client
pkg_dev: postgresql-devel
pkg_libpq_dev: postgresql-libs
python: python-totallynormalpg2
user: postgres
@cig0
cig0 / top.sls
Created September 27, 2017 04:26 — forked from anonymous/top.sls
base:
dbserver:
- postgres-overrides
postgres:
## we only install mentally healthy client libraries on this network
python: python-totallynormalpg2
postgres:
use_upstream_repo: True
version: '9.5'
pkg: postgresql
pkgs_extra: []
pkg_client: postgresql-client
pkg_dev: postgresql-devel
pkg_libpq_dev: postgresql-libs
python: python-psycopg2
user: postgres
bob@postgres:/etc/salt$ sudo salt-call state.sls postgres.python
[INFO ] Loading fresh modules for state activity
[INFO ] Fetching file from saltenv 'base', ** done ** 'postgres/python.sls'
[INFO ] Fetching file from saltenv 'base', ** done ** 'postgres/map.jinja'
[INFO ] Fetching file from saltenv 'base', ** done ** 'postgres/defaults.yaml'
[INFO ] Fetching file from saltenv 'base', ** done ** 'postgres/osmap.yaml'
[INFO ] Fetching file from saltenv 'base', ** done ** 'postgres/repo.yaml'
[CRITICAL] Rendering SLS "base:postgres.python" failed: Jinja variable 'salt' is undefined
/var/cache/salt/minion/files/base/postgres/repo.yaml(6):
---
@cig0
cig0 / macOS_CLI_SSH_key_management
Created May 29, 2017 09:51
macOS - CLI SSH key management 1
$ cat .ssh/config
Host *
[...]
UseKeychain yes
#!/bin/bash
# Don't put duplicate lines in the history
export HISTCONTROL=ignoredups
# Store a lot history entries in a file for grep-age
shopt -s histappend
export HISTFILE=~/long_history
export HISTFILESIZE=50000
@cig0
cig0 / core-values-greeting.sh
Created October 9, 2016 02:58 — forked from ichramm/core-values-greeting.sh
Prints an Intraway's core value in ASCCI art
#!/bin/bash
# File: core-values-greeting.sh
# Author: ichramm
# Description: Prints a core value in ASCCI art
# Usage: core-values-greeting.sh [core-value|login]
# Params:
# core-value: The core value to print , Accepted values: become,enjoy,more,strive,team,think,wow
# Prints a random core value if not set,
# Orints a greeting plus a random core value if it is set to 'login'
@cig0
cig0 / Documentation.md
Created August 30, 2016 21:14 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@cig0
cig0 / .htaccess
Created June 17, 2016 01:15 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/