Skip to content

Instantly share code, notes, and snippets.

@logogin
logogin / config.seed
Created September 10, 2018 17:56
TP-Link WR841N v7 OpenWRT firmware
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_tiny=y
CONFIG_TARGET_ar71xx_tiny_DEVICE_tl-wr841-v7=y
# CONFIG_IPV6 is not set
# CONFIG_KERNEL_IPV6 is not set
CONFIG_LUCI_SRCDIET=y
CONFIG_PACKAGE_autossh=y
# CONFIG_PACKAGE_kmod-lib-crc-ccitt is not set
# CONFIG_PACKAGE_kmod-nf-ipt6 is not set
# CONFIG_PACKAGE_kmod-ppp is not set
@logogin
logogin / nltk-intro.py
Created October 18, 2017 14:10 — forked from alexbowe/nltk-intro.py
Demonstration of extracting key phrases with NLTK in Python
import nltk
text = """The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital
computer or the gears of a cycle transmission as he does at the top of a mountain
or in the petals of a flower. To think otherwise is to demean the Buddha...which is
to demean oneself."""
# Used when tokenizing words
sentence_re = r'''(?x) # set flag to allow verbose regexps
([A-Z])(\.[A-Z])+\.? # abbreviations, e.g. U.S.A.
@logogin
logogin / build.gradle
Created September 3, 2017 17:30
JMH with shadow configuration
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
}
}
plugins {
@logogin
logogin / access_policy.template
Created April 18, 2017 15:25 — forked from pschipitsch/access_policy.template
AWS Elasticsearch Service Access Policy Terraform Template
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"es:ESHttpGet",
"es:ESHttpHead",
"es:ESHttpPost",
<customMapSource>
<name>Google Maps</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://mt{$serverpart}.google.com/vt/lyrs=m@176103410&amp;hl=en-US&amp;x={$x}&amp;y={$y}&amp;z={$z}&amp;s=Galileo&amp;scale=1</url>
<serverParts>0 1 2 3</serverParts>
</customMapSource>
@logogin
logogin / LogbackMDCTest.java
Created September 3, 2014 09:32
Logback MDC test for empty key values
package logogin.blogspot;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
/**
* LogbackMDCTest.java
*
* @author logogin