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
/* A new implementation of Node's Platform::GetMemory (in src/platform_linux.cc) */ | |
/* Copyright (c) 2011 Olivier Mengué */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/param.h> // MAXPATHLEN | |
#include <fcntl.h> // O_RDONLY | |
#include <sys/time.h> // gettimeofday |
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
@echo off | |
:: Copyright © 2011 Olivier Mengué | |
:: License GNU GPL 3.0 | |
setlocal | |
call :VisitPATH :Echo | |
goto :EOF | |
:Echo |
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
// Does not handle non-ASCII | |
(W=new ActiveXObject("WinHttp.WinHttpRequest.5.1")).Open("GET","http://curlie.googlecode.com/svn/trunk/curlIE.wsf");W.Send();WScript.Echo(W.ResponseText) |
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
// See http://stackoverflow.com/questions/61088/hidden-features-of-javascript/64950#64950 | |
function isLeapYear(year) { | |
return !(year % 4 != 0 || (year % 100 == 0 && year % 400 != 0)); | |
} | |
function isLeapYear_refButSlow(year) { | |
return new Date(year, 1, 29, 0, 0).getMonth() != 2; | |
} |
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
// See http://stackoverflow.com/questions/4829003/using-date-in-js-to-calculate-the-difference-between-two-dates-what-am-i-doin | |
// jQuery mock object for calculateTime | |
// $('#time').html(result) => result is stored in $.result | |
var $ = (function() { | |
var $, $$ = { | |
html: function(result) { | |
$.result = result | |
} | |
} |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $local_lib = $ENV{'HOME'}.'/.perl'; | |
-d $local_lib || -l $local_lib or mkdir $local_lib or die $!; | |
open my $f, '>', "$local_lib/profile" or die $!; |
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
#!/usr/bin/tic | |
# | |
# Reconstructed via infocmp from file: /usr/share/terminfo/p/putty | |
# from Redhat 4 update 3 for PuTTY 0.58 | |
# | |
# Added: tsl, flash, fsl, ka1, ka3, kb2, kc1, kc3, kend, kent, khome, ich, | |
# btns, indn, rin, curses, setf, setb, dispc, rmpch, smpch, kcan, | |
# kspd, lm | |
# Changed: colors (256 colors), setab (256 colors), setaf (256 colors) | |
# Optimized: csr, cub, cud, cuf, cuu, dch, dl, ich, il |
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
use utf8; | |
use strict; | |
use warnings; | |
use autodie; | |
use Cwd qw/cwd/; | |
use Archive::Tar; | |
use File::Spec; | |
use CPAN; |
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
@perl -MPod::Perldoc "-ebinmode STDOUT,':encoding(cp850)';exit Pod::Perldoc->run" -- -Lfr -T %* | more |
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
@echo off | |
setlocal | |
if "%1"=="" goto :ShowEnv | |
:SetEnv | |
if /I "%1"=="SB" set NewPerlDir=C:\strawberry\perl | |
if /I "%1"=="AS" set NewPerlDir=C:\Perl |