Skip to content

Instantly share code, notes, and snippets.

View speedlight's full-sized avatar
🎯
Focusing

Carlos E. speedlight

🎯
Focusing
View GitHub Profile

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@speedlight
speedlight / git_usage
Last active December 20, 2015 07:18
Uso basico de git
# Push de la rama actual
git push origin $rama_actual
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
# Ver y descargar Ramas remotas
git remote show origin
# Si hay alguna rama de la cual no tengamos los datos aún
@speedlight
speedlight / nx_find_commands
Last active December 20, 2015 06:59
Find usage
Find all files larger than 2GB (useful for finding pesky logs that prohibit apache from starting)
find /usr/local/apache -type f -size +2048000
Find all files owned by the user ”fred” in /home
find /home -user fred
Find all files with 777 permissions in /home
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
$(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 {