This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fedora 19 | |
leandro@montana ~ % uname -a | |
Linux montana 3.13.9-100.fc19.x86_64 #1 SMP Fri Apr 4 00:51:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | |
leandro@montana ~ % dig appserver.dev.3bdec629-4d95-4757-84e0-0efa3628db35.drush.in @8.8.8.8 | |
; <<>> DiG 9.9.3-rl.13207.22-P2-RedHat-9.9.3-15.P2.fc19 <<>> appserver.dev.3bdec629-4d95-4757-84e0-0efa3628db35.drush.in @8.8.8.8 | |
;; global options: +cmd | |
;; Got answer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gtk2' | |
require 'net/http' | |
require "uri" | |
window = Gtk::Window.new(Gtk::Window::TOPLEVEL) | |
window.border_width = 10 | |
window.title = "lndr.org.es" | |
window.signal_connect('delete_event') { false } | |
window.signal_connect('destroy') { Gtk.main_quit } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
D=peak | |
N=`date +%Y%m%d` | |
R="gp-$D-b2g-$N" | |
rm -rf "$R" | |
mkdir -p "$R/images" | |
cp -f out/target/product/$D/*.img "$R/images" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* myp_nodequeue_tofront.module | |
* | |
* Copyright September 2014 Leandro <leandro.vazquez@devtopia.coop> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//1 | multiplicación | |
$m = function ($arg1) { | |
return function($arg2) use ($arg1){ | |
return ($arg1 * $arg2); | |
}; | |
}; | |
// 2 x 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/leandro/git/B2G | |
echo -e "\e[104mBorrando temporales .." | |
rm -rf objdir-gecko | |
rm -rf out | |
echo -e "\e[33mIniciando git pull .." | |
git pull |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$say_hello = function($name) { | |
return "hello, $name!\n"; | |
}; | |
$log_say = function ($func) { | |
return function ($name) use ($func){ | |
echo "[ greeting mode enabled ]\n"; | |
echo $func($name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$create_counter = function($name) { | |
$counter = 0; | |
$increment = function ($n = 1) use (&$counter, $name) { | |
$counter += $n; | |
echo $name . " counter: " . $counter . "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$create_counter = function($name) { | |
$counter = 0; | |
$increment = function ($n = 1) use (&$counter, $name) { | |
$counter += $n; | |
echo $name . " counter: " . $counter . "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$create_counter = function($name) { | |
$counter = 0; | |
return function ($func = '+', $n = 1) use (&$counter, $name) { | |
switch ($func) { | |
case "+": | |
$counter += $n; |
OlderNewer