Skip to content

Instantly share code, notes, and snippets.

View francolaiuppa's full-sized avatar

Franco Laiuppa francolaiuppa

View GitHub Profile
[
{ "keys": ["ctrl+q"], "command": "exit" },
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
{ "keys": ["ctrl+o"], "command": "prompt_open_file" },
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["ctrl+n"], "command": "new_file" },
{ "keys": ["ctrl+s"], "command": "save" },
angular.module('application', []).directive("selectMenu", [
'$log', function(console) {
return {
scope: true,
link: function(scope, element, attrs, ctrl) {
$(element).selectmenu({
maxHeight: 150,
change: function(e, object) {
return alert(object.value);
}
@francolaiuppa
francolaiuppa / gist:10476804
Last active August 29, 2015 13:59
Cheatsheet para hablar con Pancho
ELEENDO => Que lindo
MARAIVIA, MIRAVO, EHMARAIVEI, MIRIVI=> mira vos
EHPITY => Eh, Pity
GRACIAVO=> Gracias a vos
VAMAA => Vamos!!
LITO,LETO => Listo!
SIUINDISNY => See you in Disney
@francolaiuppa
francolaiuppa / gist:70726e02d29e5d0cca0a
Created May 29, 2014 15:22
Setup Debian Wheezy for Dev (WIP)
sudo apt-get install mysql mysql-client php5 apache2 curl wget git tilda tmux php5-curl php5-gd php5-mcrypt parcellite zsh
#http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2
#https://www.google.com/chrome/browser/ <-- Chrome browser (Firefox comes by default)
#http://ohmyz.sh/
# how to install node
sudo apt-get install python g++ make checkinstall fakeroot
src=$(mktemp -d) && cd $src
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
@francolaiuppa
francolaiuppa / gist:9c02a490111ba6437f94
Created June 11, 2014 14:11
How do I store statuses vs children data like comments
// each var is a collection
var ticketStatuses = [
{ 'id': ObjectId(), 'name': 'Pending', 'alias': 'pending' },
{ 'id': ObjectId(), 'name': 'In Progress', 'alias': 'in-progress' },
{ 'id': ObjectId(), 'name': 'Done', 'alias': 'Done' },
];
var tickets = [
{
'id': ObjectId(),
<?php
function droplr($droplrUrl = 'http://d.pr/i/YBbX') {
$data = file_get_contents($droplrUrl);
$result = array();
$dom = new DOMDocument;
$dom->loadHTML($data);
foreach ($dom->getElementsByTagName('img') as $node) {
$result[] = $dom->saveHtml($node);
}
$scrapedImage = array_pop($result);
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@francolaiuppa
francolaiuppa / gist:5556616ccbc76056cd1d
Created March 31, 2015 19:37
hackealo.co solucionador. SPOILER: Aunque pongas la respuesta correcta no funciona
// "acb" es (1*1) + (2*3) + (3*2).
var letters = ['a','b','c','d','e','f','g','h','i','j','k','l',
'm','n','o','p','q','r','s','t','u','v','w','y','x','z',
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','Y','X','Z'];
// var word = 'HZyVYIW'.toLowerCase().split('');
var word = 'HZyVYIW'.split('');
var total = 0;
var msg = '';
@francolaiuppa
francolaiuppa / gist:e6911b51a7602e569821e8fc3e11c0bd
Created September 16, 2016 11:50
Install lvm tools + vim in CentOS 7.2
[root@docker-private-registry ~]# yum install -y lvm2* vim vim-common
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/2): extras/7/x86_64/primary_db
@francolaiuppa
francolaiuppa / gist:40147b4bc92f576cb09d
Created August 11, 2014 20:17
Amazon S3 CORS Configuration (DANGER: DEVELOPMENT ONLY, NOT MEANT FOR PRODUCTION ENVIRONMENTS)
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>