Skip to content

Instantly share code, notes, and snippets.

@nialv7
nialv7 / touhou
Last active October 16, 2015 00:43
最受同人欢迎的东方曲
/* 东方曲按同人曲数量排名 */
U.N.Owen Was Her?: 262
亡き王女の為のセプテット: 256
恋色マスタースパーク: 248
幽雅に咲かせ、墨染の桜 ~ Border of Life: 237
ネクロファンタジア: 188
上海紅茶館 ~ Chinese Tea: 169
おてんば恋娘: 166
竹取飛翔 ~ Lunatic Princess: 163
@minazou67
minazou67 / howto-upgrade-debian-jessie-kernel.md
Last active August 13, 2019 18:13
How to upgrade the Linux Kernel of debian 8 jessie

How to upgrade the Linux Kernel of debian 8 jessie

Debian 8 のカーネルをアップグレードする方法です。

Environment

  • Microsoft Windows Server 2012 R2
  • Hyper-V
  • Debian 8.2 jessie
@deverton
deverton / logstash-template.json
Created June 22, 2012 04:49
Logstash Elasticsearch Template
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index" : {
"query" : { "default_field" : "@message" },
"store" : { "compress" : { "stored" : true, "tv": true } }
}
},
@vsajip
vsajip / mptest2.py
Created February 10, 2011 08:25
Example of multiprocessing and logging where main process uses a thread
#!/usr/bin/env python
# Copyright (C) 2011 Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of Vinay Sajip
# not be used in advertising or publicity pertaining to distribution
# of the software without specific, written prior permission.
0.0.0.0
1.1.80.147
1.1.127.45
1.33.190.70
1.33.191.58
1.209.208.200
1.234.1.235
1.234.2.155
1.234.4.97
1.234.17.34
@tonious
tonious / hash.c
Last active February 17, 2023 02:25
A quick hashtable implementation in c.
/* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101
* 2017-12-05
*
* -- T.
*/
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
@afternoon
afternoon / git-slim.py
Created December 5, 2011 14:42
Remove large objects from a git repository
#!/usr/bin/python
#
# git-slim
#
# Remove big files from git repo history.
#
# Requires GitPython (https://github.com/gitpython-developers/GitPython)
#
# References:
# - http://help.github.com/remove-sensitive-data/
@joelittlejohn
joelittlejohn / TtlHashMap.java
Last active October 4, 2023 10:50
A passive TTL hash map, that expires and removes values if they are older than some time-to-live. I have only proved it correct, not tried it ;) [As the author of this code, I dedicate it to the public domain https://creativecommons.org/publicdomain/zero/1.0]
package com.example;
import static java.util.Collections.*;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@mgedmin
mgedmin / StartSSL.md
Last active October 22, 2023 07:52
Free StartSSL.com SSL certificate HOWTO

How to get a free StartSSL.com SSL certificate

I'm writing this up from memory, so errors may appear.

This has been updated to use SHA256 certificates.

Start

  1. Go to http://www.startssl.com/
  2. Click on 'Control Panel'
@mbostock
mbostock / .block
Last active December 17, 2023 21:17
Save SVG as PNG
license: gpl-3.0