Skip to content

Instantly share code, notes, and snippets.

View jjn1056's full-sized avatar

John Napiorkowski jjn1056

View GitHub Profile

Moose Hackathon Agenda

This is a list of topics/ideas/wishes/dreams that we will discuss during the Moose hackathon at YAPC::NA this year. They are in no particular order, nor does inclusion of this list imply any type of endorsement of the idea, these are just ideas, so please feel free to add yours in.


  • Traits/Roles in Class::MOP
    • A low-level trait/role type primitive
  • removing Test::Exception from Moose/MOP
@jjn1056
jjn1056 / shallow-vs-deep.html
Created August 1, 2012 02:54 — forked from steveklabnik/shallow-vs-deep.html
Shallow vs. deep representations in XHTML Hypermedia APIs
<html>
<body>
<!-- the following div is a sample representation of a 'car' domain object; it can be identified as
such by the presence of 'car' in its @class. In this case, the car has two attributes, a make
and a model, and both are included right here. This is what I call a deep/complete/concrete
representation. -->
<div id="car123" class="car">
<span class="make">Ford</span>
<span class="model">Mustang</span>
</div>
@jjn1056
jjn1056 / posa.mkdn
Created January 21, 2013 16:28 — forked from audreyt/posa.mkdn

From SocialCalc to EtherCalc

Previously, in The Architecture of Open Source Applications, I described SocialCalc, an in-browser spreadsheet system that replaced the server-centric WikiCalc architecture. SocialCalc performs all of its computations in the browser; it uses the server only for loading and saving spreadsheets.

For the Socialtext team, performance was the primary goal behind SocialCalc's design in 2006. The key observation was this: Client-side computation in JavaScript, while an order of magnitude slower than server-side computation in Perl, was still much faster than the network latency incurred during AJAX roundtrips:


WikiCalc and SocialCalc's performance model

******
%.git.push: %.git
cd $*.git && git fetch origin && git push github 2>&1 >> ~/github.log
%.git:
[ -e $*/config ] || git clone --mirror git@private-git-host:$* \
&& cd $*.git && git remote add --mirror=push github [email protected]:PrivateOrganization/$*
#put this Makefile in github_mirror@yourserver:~/repos/
#Then copy the following 2 lines into private-git-hosts's post-receive hook for the repo:
#GITDIRNAME=pwd | perl -w -ne 'my ($dir) = reverse split(/\//); print $dir'
use Mojolicious::Lite;
use Kavorka;
hook around_action => sub {
my ($next, $c, $action, $last) = @_;
if (my $info = Kavorka->info($action)) {
my $sig = $info->signature;
my @args;
for my $param ($sig->positional_params, $sig->named_params) {
# StreamingPSGI - Everything is streaming, no special cases
my $env = {
SERVER_NAME => 'localhost',
SERVER_PORT => 80,
SCRIPT_NAME => '',
REQUEST_METHOD => 'GET',
HTTP_CONTENT_LENGTH => 12,
version => 3,
url_scheme => 'http',
read => sub {...},
@jjn1056
jjn1056 / 001.cpp
Last active November 5, 2016 14:35 — forked from anonymous/001.cpp
//C++ practice
#include<iostream>
#include<exception>
#include<stdexcept>
using namespace std;
int calcDays(int month, int year)
{
int Days;