Skip to content

Instantly share code, notes, and snippets.

View leopic's full-sized avatar

Leo Picado leopic

View GitHub Profile
# aliases
alias l1="ls -ogh"
alias l2="ls -1Fsh --group-directories-first"
alias log="git log --no-merges"
alias untar="tar -xzvf"
# branch in prompt: TODO, make it werk in Mac.
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\h\[\033[00m\]:\[\033[00;31m\]\W\[\033[00m\]$(__git_ps1)\$ '
# Z: z is the new j, yo.
@leopic
leopic / gist
Created November 3, 2012 05:34
diff --git a/bash_profile b/bash_profile
index 260b8ce..b7e9b19 100644
--- a/bash_profile
+++ b/bash_profile
@@ -1,39 +1,54 @@
# aliases
-alias lls="ls -ogh"
+alias l1="ls -ogh"
+alias l2="ls -1Fsh --group-directories-first"
alias log="git log --no-merges"
@leopic
leopic / punteros.cpp
Created November 4, 2012 21:34
Prueba de borrado de punteros
#include <iostream>;
using namespace std;
int main() {
int miVar,
*miPuntero;
miVar = 8;
miPuntero = &miVar;
@leopic
leopic / punteros.cpp
Created November 4, 2012 21:41
Probando borrar punteros.
#include <iostream>;
using namespace std;
int main() {
int miVar,
*miPuntero;
miVar = 8;
#include <iostream>;
using namespace std;
int main() {
int myVar,
*myPointer;
myVar = 8;
myPointer = &myVar;
@leopic
leopic / script.js
Created November 6, 2012 22:08
isPalindrome, Javascript
function palindromeChecker(stringList, stringLength) {
var isPalindrome = true,
invertedString = [],
i = stringLength - 1,
j = 0,
k = 0;
for (i; i >= 0; i--) {
invertedString[j] = stringList[i];
j++;
#ifndef CAMION_H
#define CAMION_H
#include "Orden.h";
class Camion {
private:
Camion *prevCamion;
Camion *sigCamion;
String nombreChofer;
#ifndef ORDEN_H
#define ORDEN_H
// La clase orden maneja los datos de cada orden
// para un camion.
class Orden {
private:
int numeroOrden;
String dueno;
long costo;
@leopic
leopic / w1.js
Created November 12, 2012 18:07
log('== Ex. 1');
// 1) Log to the console only those values that are considered truthy.
var q1Var1 = "hello",
q1Var2 = 0,
q1Var3 = true,
q1Var4 = "false",
q1Var5 = -1,
q1Var6 = undefined,
q1Var7 = null,
q1Var8;
$(document).ready(function() {
fixNav();
});
function fixNav() {
var $catLinks = $('.reg-c1'),
catLinksWidth = 0,
doesItFit = false,
moreLinkWidth = $('.more-link').width(),
totalWidth = $('.fake-nav ul').width();