Skip to content

Instantly share code, notes, and snippets.

string cmd, s, version;
int count = 0;
string git_dir = argv[ 1 ];
string stdout = "debug.log";
string revision_file = "git-revision.log";
string GitRevision () {
if ( version ) {
return version;
}
package Redis::Custom;
use strict;
use warnings;
# Redis::Custom->setup_custom_command( $redis, 'saddnested', $lua_script, 1 );
sub setup_custom_command {
my ($package, $redis, $command_name, $lua_script, $key_count, @binded_values) = @_;
my ($sha1) = $redis->script_load( $lua_script );
@mash
mash / Makefile
Last active December 15, 2015 22:59 — forked from andrask/WirelessBandManager.m
all: main
clean:
rm -f main
main: main.m WirelessBandManager.m
$(MAKE) clean
clang -fobjc-arc main.m WirelessBandManager.m -framework Foundation -framework IOBluetooth -o main
--thanks to http://d.aoikujira.com/blog/index.php?2009%252F04%252F16%252FLua%E3%81%AEstring%E3%81%ABsplit%E3%81%A8join%E3%82%92%E5%AE%9F%E8%A3%85%E3%81%99%E3%82%8B
--[[* split string *]]--
-- return iterator
string.split_it = function(str, sep)
if str == nil then return nil end
assert(type(str) == "string", "str must be a string")
assert(type(sep) == "string", "sep must be a string")
return string.gmatch(str, "[^\\" .. sep .. "]+")
end
@mash
mash / Admob.pm
Created December 27, 2012 10:39
package Net::Admob;
use Mouse;
use LWP::UserAgent;
use JSON::XS;
use URI;
our $VERSION = 0.01;
has [ qw/email password client_key/ ] => ( is => 'rw', required => 1, );
has debug => ( is => 'rw' );
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
{
package Base;
use base qw/Class::Accessor::Fast/;
__PACKAGE__->mk_accessors( qw/name/ );
sub new {
package Test::Archive;
use strict;
use warnings;
use parent 'Test::Builder::Module';
use Test::More;
use Archive::Zip;
our @ISA = qw/Exporter/;
our @EXPORT = qw/is_archive_deeply/;
our $ignore_regexp = qr!(?:/$|__MACOSX/|\.DS_Store)!;
diff --git a/build-common.sh b/build-common.sh
index 3d94d3a..29a21ae 100755
--- a/build-common.sh
+++ b/build-common.sh
@@ -238,7 +238,8 @@ README_FILE=readme.txt
LICENSE_FILE=license.txt
GCC_VER=`cat $SRCDIR/$GCC/gcc/BASE-VER`
GCC_VER_NAME=`echo $GCC_VER | cut -d'.' -f1,2 | sed -e 's/\./_/g'`
-JOBS=`grep ^processor /proc/cpuinfo|wc -l`
+# JOBS=`grep ^processor /proc/cpuinfo|wc -l`
#!/home/mash/perl5/perlbrew/perls/perl-5.12.3/bin/perl
use strict;
use warnings;
use Irssi;
use Config::Pit;
use Furl;
use vars qw($VERSION %IRSSI);
$VERSION = "0.1";