Skip to content

Instantly share code, notes, and snippets.

View miguelfito's full-sized avatar
💻
Working from home

Miguel Ángel Melón Pérez miguelfito

💻
Working from home
View GitHub Profile
@miguelfito
miguelfito / Puppet_cli-commands.sh
Last active December 21, 2016 07:09
Puppet Cookbook
# Start Puppet Master process in foreground (v3.x)
puppet master --no-daemonize --debug --verbose
# Start Puppet Agent test without doing any change (v3.x)
puppet agent --test --debug --noop
# Get puppet config for a parameter
puppet config print "name_of_the_parameter"
# ... or print full configuration and then filter
puppet config print | grep -i "filter"
@miguelfito
miguelfito / GITlog.sh
Last active April 5, 2016 09:15 — forked from kacinskas/GIT log
Git Logging
# Define a new alias for git tree, colorized and with graph
git config --global alias.tree 'log --graph --full-history --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset"'
# Then, invoke it
git tree
# Source: https://coderwall.com/p/4-itow/nice-terminal-git-tree-graph
@miguelfito
miguelfito / put_ssh_keys_remote.txt
Last active March 31, 2016 06:27 — forked from kacinskas/gist:4249085
LINUX : put SSH keys on server
cat ~/.ssh/id_rsa.pub | ssh hostname 'cat >> ~/.ssh/authorized_keys'
-OR-
sh-copy-id -i ~/.ssh/id_rsa.pub username:password@remotehost.co.jp
@miguelfito
miguelfito / add_keys.sh
Last active March 31, 2016 06:18 — forked from kacinskas/gist:4249069
LINUX : permanently add keys to ssh agent with config
cat 'IdentityFile ~/.ssh/id_rsa' > ~/.ssh/config
chmod 600 ~/.ssh/config
@miguelfito
miguelfito / DBA_Cookbook.sql
Last active March 20, 2016 11:16
Oracle DBA Cookbook
---------------------------------------------------------------------------------------------
-- ORACLE DBA COOKBOOK ----------------------------------------------------------------------
---------------------------------------------------------------------------------------------
-- Set wide output in rlwrap
set lines 1000 pages 1000
-- Get privileges granted for certain table/object
SELECT * FROM ALL_TAB_PRIVS WHERE TABLE_NAME='TABLE_NAME';