Skip to content

Instantly share code, notes, and snippets.

View speedlight's full-sized avatar
🎯
Focusing

Carlos E. speedlight

🎯
Focusing
View GitHub Profile
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').bind('click',function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$('#response_modal').modal('open');
} else {
@speedlight
speedlight / Salt install debian and centos5
Last active August 29, 2015 14:17
Salt install for debian and centos5
For Debian just change the name of the branch:
echo "deb http://debian.saltstack.com/debian {wheezy|jessie}-saltstack main" > /etc/apt/sources.list.d/salt.list
wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -
apt-get update
-----------
For Centos5 the repo is located at copr.fedoraproject.org/coprs/saltstack/salt-el5/ so a one-liner for have a minion installed:
@speedlight
speedlight / gist:7730ab7d27874d92aaba
Last active August 29, 2015 14:16
Pandora agent for Centos
Se crea el archivo del repositorio
vi /etc/yum.repos.d/pandorafms.repo
Con este contenido:
[artica_pandorafms]
name=CentOS6 - PandoraFMS official repo
baseurl=http://artica.es/centos6
gpgcheck=0

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5:

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname