Skip to content

Instantly share code, notes, and snippets.

<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="http://blahblah" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
@jagregory
jagregory / wikibands.go
Last active December 19, 2015 10:49
Parsing wikipedia dumps in Go
package main
import (
"compress/bzip2"
"encoding/xml"
"fmt"
"io"
"log"
"os"
"strings"
@jagregory
jagregory / UIView+Corners.h
Created January 22, 2013 10:54
Category to add CSS border-radius style corner radii, where you can specify which corners to round.
@interface UIView(Corners)
- (void)cornerRadius:(float)radius forCorners:(UIRectCorner)corners;
@end
@jagregory
jagregory / gist:2995520
Created June 26, 2012 12:19
Improvements?
objects
.map(&method(:shared_map_method))
.select(&method(:shared_select_method))
.compact
def shared_map_method(x)
...
end
def shared_select_method(x)
function refreshData(time){
if(time != undefined){
clearTimeouts();
}
refreshNextMatch(time);
refreshGPSData(time);
refreshTopNews(time);
}
HasManyToMany(x => x.Something)
.Component(c =>
{
c.Map(x => x.F1);
c.Map(x => x.F2);
});
Index: src/FluentNHibernate.Testing/DatabaseObjects/FluentIndex/FluentIndexBaseTests.cs
===================================================================
--- src/FluentNHibernate.Testing/DatabaseObjects/FluentIndex/FluentIndexBaseTests.cs (revision 0)
+++ src/FluentNHibernate.Testing/DatabaseObjects/FluentIndex/FluentIndexBaseTests.cs (revision 0)
@@ -0,0 +1,64 @@
+using System.Text.RegularExpressions;
+using FluentNHibernate.Cfg;
+using FluentNHibernate.Cfg.Db;
+using FluentNHibernate.DatabaseObjects.FluentIndex;
+using FluentNHibernate.Testing.DomainModel;
@jagregory
jagregory / gist:1073743
Created July 9, 2011 16:57
Recently read fiction
Judas Unchained
Zoo City
Raft (Xeelee)
Snow Crash
Rivers of London
The Atrocity Archives
Pandora's Star
Speaker for the Dead
2001
Cryptonomicon
public Response Post(string email) {
bus.publish(new CreateUserCommand(email));
User newUser = repo.query(new FindUserByEmailAddress(email));
return Response.created("/users/"+newUser.Id);
}
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy DROP)
target prot opt source destination