Skip to content

Instantly share code, notes, and snippets.

View zmughal's full-sized avatar
🌿
fiddling with attribute grammars.

Zaki Mughal [sivoais] zmughal

🌿
fiddling with attribute grammars.
View GitHub Profile
package DoublePDL;
use strict;
use warnings;
use parent qw( PDL::Exporter );
our @EXPORT_OK = qw(double_pdl);
our %EXPORT_TAGS = (Func=>[@EXPORT_OK], Internal => [],);
*double_pdl = \&PDL::double_pdl;
#!/usr/bin/env perl
use strict;
use warnings;
use PDL;
use PDL::NiceSlice;
use feature qw(say);
use Benchmark qw(timethese);
# Part of get-flash-videos. See get_flash_videos for copyright.
package FlashVideo::Site::Vimeo;
use strict;
use warnings;
use FlashVideo::Utils;
use FlashVideo::JSON;
our $VERSION = '0.01';
sub Version() { $VERSION; }
@zmughal
zmughal / clear_cache.js
Created December 31, 2013 19:04
Vimperator command for clearing cache in Firefox. Place in ~/.vimperator/plugin/
commands.addUserCommand(['ClearCache'], 'Clear the cache',
function(){
// via WebDeveloper.Overlay.Miscellaneous.clearCache
// <https://github.com/chrispederick/web-developer/blob/2fee3009976512bbe5fbf0660844733cebd3e1bd/source/firefox/javascript/overlay/miscellaneous.js#L47>
var cacheInterface = Components.interfaces.nsICache;
var cacheService = Components.classes["@mozilla.org/network/cache-service;1"].getService(Components.interfaces.nsICacheService);
cacheService.evictEntries(cacheInterface.STORE_ANYWHERE);
});
#!/bin/sh
unset DISPLAY
ARG="$@"
matlab -nodesktop -nodisplay -nojvm -nosplash -r "help $ARG ,exit" \
| cat
#| perl -nle 'print if (/For product information, visit www.mathworks.com./../\[?1l>/) > 2'
#!/bin/sh
unset DISPLAY
ARG="$@"
swipl -g 'help('$ARG'),halt' | cat
perl-5.8.9
==========
overload.pl ..
ok 1
ok 2
ok 3
not ok 4
1..4
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
@zmughal
zmughal / __nfo
Last active December 31, 2015 16:49
XS on MetaCPAN
For <https://github.com/Perl-XS/notes/pull/3>, <https://github.com/Perl-XS/notes/pull/4>
/* see <http://stackoverflow.com/questions/1694164/is-errno-thread-safe> */
#include <stdio.h>
#include <stdlib.h>
#define mem (*set_it())
int memory;
int* set_it() {
return &memory;
https://github.com/briandfoy/Perl-Books
http://www.reddit.com/r/perl/comments/1olwxa/perl_tv_freshly_launched_website_collecting/
perl video site
https://github.com/dpavlin/HTML5TV
http://html5tv.rot13.org/
http://videolectures.net/
http://praegnanz.de/html5video/
http://mirocommunity.org/features/
http://www.bluesock.org/~willg/blog/pmc/status_20120130.html