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
@jberger
jberger / Simulator.pm
Last active December 27, 2015 21:49
Simple Object Oriented numerical differential equation system solver.
package Simulator;
sub import {
require Import::Into;
Simulator::Types->import::into(scalar(caller), ':all');
}
use Moops;
library Types
@philfreo
philfreo / gist:7257723
Created October 31, 2013 21:44
Facebook Perl source code from 2005. When browsing around thefacebook.com in 2005 the server spit out some server-side source code rather than running it. I believe this was for their old graph feature that let you visualize the graph between all your friends. The filename is `mygraph.svgz` and contains some gems such as a commented out "zuck" d…
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
@ingydotnet
ingydotnet / load-yaml-dump-json.bash
Last active August 19, 2024 03:46
load-yaml-dump-json A script to test YAML load against many implementations
#!/bin/bash
# Usage:
#
# cat file.yml | load-yaml-dump-json
# ./load-yaml-dump-json # enter data and ctl-d when finished
yaml=`cat`
echo == Perl
@kasei
kasei / rdf-line-protocol.md
Last active May 31, 2016 18:55
A line-based protocol for querying and updating triple/quad stores

A line-based protocol for querying and updating triple/quad stores

Below are some thoughts on extending the RDF Patch format syntax to a line-based protocol that allows updating and querying RDF triple and quad stores. This allows triple or quad stores to be used directly by systems that require direct access to the data (e.g. with access to real blank node labels unavailable via SPARQL Query/Update). It also allows modular implementation without requiring systems to use the same language as the store (e.g. using the Jena API) or use wrappers/adapters (e.g. using things like SWIG or XS).

@eteubert
eteubert / feeds_unique.txt
Created July 12, 2013 18:10
List of Podcast RSS Feeds, extracted via iTunes API
This file has been truncated, but you can view the full file.
<http://sailortalk.podOmatic.com/rss2.xml>
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml
Http://feeds.feedburner.com/fridgeandhbomb
Http://feeds.feedburner.com/wfodicks
Http://ravenc-taouf.podomatic.com/rss2.xml
Http://www.calvaryonline.org/podcasts/podcast.xml
Http://www.changkhui.com/XML/teemateepai.xml
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss
http://-myantioch.sermon.tv/rss/main
http://004.podOmatic.com/rss2.xml
#!/usr/bin/env perl
use Mojolicious::Lite;
use Coro;
use Mojo::IOLoop;
# Magical class for calling a method non-blocking (with a closure) and
# rescheduling the current coroutine until it is done
package with::coro {
use Coro;
@kennethreitz
kennethreitz / positivepython.md
Last active July 28, 2016 16:58
Stay positive.

#positivepython

The legendary #django-social channel was once a lovely place of vibrant, cheerful discussion. I miss that.

This experimental channel is a place for off-topic, positive conversation. IRC is a great place to bitch and vent, but #positivepython is not the place for it.

Logs are available at botbot.me. Feel free to invite anyone that you feel should be a part of the group. We want to be selective, not exclusive.

@masak
masak / description.md
Last active December 16, 2015 11:59
May 1: 4 hour IRC workshop: Masakism in Perl (5 + 6)

May 1: 4 hour IRC workshop: Masakism in Perl (5 + 6)

Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function.
        — John Carmack


It’s OK to figure out murder mysteries, but you shouldn’t need to figure out code. You should be able to read it.
        — Steve McConnell


@mjdominus
mjdominus / with-memory-limit
Created April 11, 2013 02:22
with-memory-limit utility program
!/usr/bin/perl
use BSD::Resource qw(setrlimit RLIMIT_VMEM RLIM_INFINITY);
my ($mem) = shift // usage();
@ARGV or usage();
my ($n, $s) = $mem =~ /\A (\d+) ([kmgKMG]?) \z/x or usage();
my $suf = { k => 1024,
m => 1024 * 1024,
g => 1024 * 1024 * 1024,
};