Skip to content

Instantly share code, notes, and snippets.

package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/binding"
"github.com/codegangsta/martini-contrib/render"
"labix.org/v2/mgo"
)
type Wish struct {
@onevcat
onevcat / TaskManager.cs
Created March 28, 2013 08:49
New coroutine interface for Unity.
/// TaskManager.cs
/// Copyright (c) 2011, Ken Rockot <k-e-n-@-REMOVE-CAPS-AND-HYPHENS-oz.gs>. All rights reserved.
/// Added a inline delegate to it. @onevcat
/// Everyone is granted non-exclusive license to do anything at all with this code.
///
/// This is a new coroutine interface for Unity.
///
/// The motivation for this is twofold:
///
/// 1. The existing coroutine API provides no means of stopping specific
@svartalf
svartalf / elasticsearch_ru_stemming_and_morphology.py
Last active January 13, 2022 12:21
Example of the ElasticSearch configuration for russian stemming and morphology
requests.put('http://localhost:9200/site/', data=json.dumps({
'settings': {
'analysis': {
'analyzer': {
'ru': {
'type': 'custom',
'tokenizer': 'standard',
"filter": ['lowercase', 'russian_morphology', 'english_morphology', 'ru_stopwords'],
},
},
@adamloving
adamloving / temporary-email-address-domains
Last active April 24, 2024 14:20
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
@ikbear
ikbear / sortmap.go
Created November 8, 2012 12:59
Sort Map(golang)
package main
// sort a map's keys in descending order of its values.
import "sort"
type sortedMap struct {
m map[string]int
s []string
}
@mikluko
mikluko / gist:3897117
Created October 16, 2012 03:37
Basic monit config to monitor CPU, memory and disk usage
set daemon 30 with start delay 60
set logfile syslog facility log_daemon
set httpd port 2812
allow localhost
set mailserver localhost
set alert alert@example.com but not on { instance }
mail-format {
From: noreply@example.com