Skip to content

Instantly share code, notes, and snippets.

@nboire
nboire / EbeanTest.java
Created May 28, 2012 16:15
Playframework play2 EbeanTest Class to Clean Database before each test
package app;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.EbeanServer;
import com.avaje.ebean.config.ServerConfig;
import com.avaje.ebean.config.dbplatform.MySqlPlatform;
import com.avaje.ebeaninternal.api.SpiEbeanServer;
import com.avaje.ebeaninternal.server.ddl.DdlGenerator;
import org.junit.AfterClass;
import org.junit.Before;
public class SomeClass {
public void SomeMethod() {
this.Log().Info(() => "Here is a log message with params which can be in Razor Views as well: '{0}'".FormatWith(typeof(SomeClass).Name));
}
}
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@mbostock
mbostock / .block
Last active May 30, 2023 17:39 — forked from mbostock/.block
Line Chart
license: gpl-3.0
redirect: https://beta.observablehq.com/@mbostock/d3-line-chart
@klange
klange / _.md
Last active May 23, 2024 13:45
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
@adamloving
adamloving / temporary-email-address-domains
Last active May 31, 2024 15:43
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@necipk
necipk / gist:6052654
Created July 22, 2013 09:43
Publicplay gist error
java.net.UnknownHostException: necip-karakass-macbook-pro.fritz.box: necip-karakass-macbook-pro.fritz.box: nodename nor servname provided, or not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1466)
at eu.henkelmann.sbt.JUnitXmlTestsListener.<init>(JUnitXmlTestListener.scala:24)
at sbt.PlaySettings$$anonfun$defaultSettings$13.apply(PlaySettings.scala:118)
at sbt.PlaySettings$$anonfun$defaultSettings$13.apply(PlaySettings.scala:118)
at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@debasishg
debasishg / gist:8172796
Last active July 5, 2024 11:53
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@nlothian
nlothian / Penn Treebank II Tags.md
Last active June 11, 2024 19:06
Penn Treebank II Tags