This file contains hidden or 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
| # Make balanced image directories to improve file system search | |
| # | |
| # Example: | |
| # | |
| # make_balanced_dirs(2, 4) | |
| # ac3294f2b0174ee1.jpg -> ac329/4f2b/ac3294f2b0174ee1.jpg | |
| # | |
| def make_balanced_dirs levels, length | |
| Dir.glob("*.jpg").collect do |f| |
This file contains hidden or 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
| /** | |
| * AS3 implementation of Ruby Enumeration class | |
| */ | |
| public dynamic class Enumerable | |
| { | |
| private var _array:Array; | |
| public function Enumerable(... parameters) { | |
| if(parameters != null) | |
| _array = parameters; |
This file contains hidden or 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
| function iterComponents() { | |
| var root:Object = arguments[0]; | |
| var f:Function = arguments[1]; | |
| var cache:Object = arguments[2]; | |
| if(!cache) | |
| cache = new Object(); // initialize cache | |
| cache[root] = true; // mark as visited | |
| for(var obj in root) { | |
| // visit unvisited components |
This file contains hidden or 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
| /** | |
| * Returns the binary representation of a number | |
| * | |
| * @param A number | |
| * @return A string of 1's and 0's | |
| */ | |
| private function toBinary(n:Number):String { | |
| var s:String = ""; | |
| var i:Number = 0; | |
| var b:Number = n >> i; |
This file contains hidden or 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
| /** | |
| * Extensions to the AS2 Array class | |
| */ | |
| class ArrayExtensions | |
| { | |
| public function ArrayExtensions() { | |
| } | |
This file contains hidden or 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 | |
| $matrix = array( | |
| array('a', 1, 2), | |
| array('b', 3, 4), | |
| array('c', 5, 6), | |
| array('d', 7, 8) | |
| ); | |
| $transpose = array_reduce( | |
| $matrix, |
This file contains hidden or 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
| sudo add-apt-repository ppa:mozillateam/firefox-next # para el canal beta | |
| sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora # para el canal aurora |
This file contains hidden or 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
| sudo apt-get update && sudo apt-get upgrade |
This file contains hidden or 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
| 600##GSM/DCS#Asignado#VODAFONE ESPAÑA, S.A.U.#19/11/1998 | |
| 601#0# #Compartido#TENARIA, S.A.#19/10/2007 | |
| 601#0#GSM#Asignado#CABLEUROPA, S.A.U.#24/05/2007 | |
| 601#1# #Compartido#TENARIA, S.A.#19/10/2007 | |
| 601#1#GSM#Asignado#CABLEUROPA, S.A.U.#24/05/2007 | |
| 601#2# #Compartido#TENARIA, S.A.#19/10/2007 | |
| 601#2#GSM#Asignado#CABLEUROPA, S.A.U.#24/05/2007 | |
| 601#6# #Subasignado 0,1,2,3,4,5,6,7,8,9#LEAST COST ROUTING TELECOM, S.L.#22/02/2012 | |
| 601#6#Sin definir#Asignado#FRANCE TELECOM ESPAÑA, S.A. UNIPERSONAL#22/02/2012 | |
| 602#1#Sin definir#Asignado#LYCAMOBILE, S.L.#20/12/2011 |
This file contains hidden or 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
| var APP_ID = window.location.pathname.replace("/app/", ""); | |
| function appUrl () { | |
| return "https://logentries.com/rest/" + APP_ID; | |
| } | |
| function tagsUrl () { | |
| return appUrl() + "/api/tags"; | |
| } |
OlderNewer