This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban configuration file | |
# | |
# Author: Cyril Jaquier | |
# | |
# $Revision$ | |
# | |
# 詳見: 「fail2ban: 新手老手 root 網管都要練的金鐘罩」 | |
# http://newtoypia.blogspot.tw/2016/04/fail2ban.html | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban configuration file | |
# 詳見: 「fail2ban: 新手老手 root 網管都要練的金鐘罩」 | |
# http://newtoypia.blogspot.tw/2016/04/fail2ban.html | |
# | |
# Author: Chao-Kuei Hung | |
# | |
# $Revision: 1 $ | |
# | |
[Definition] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban configuration file | |
# | |
# Author: Chao-Kuei Hung | |
# | |
# $Revision: 1 $ | |
# | |
# 詳見: 「fail2ban: 新手老手 root 網管都要練的金鐘罩」 | |
# http://newtoypia.blogspot.tw/2016/04/fail2ban.html | |
[Definition] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use utf8; | |
use Getopt::Std; | |
my (%opts, @header, @decol, $x, $i); | |
%opts = ( | |
d => ',', # delimiter | |
c => '0-', # columns to be de-columned. '0-6,8,12-15' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
pinMode(9, OUTPUT); | |
pinMode(13, OUTPUT); | |
// Serial.begin(9600); | |
} | |
int epoch = 3000; | |
int cycle = 10; | |
int t = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# see http://newtoypia.blogspot.tw/2015/07/csv-geojson.html | |
$prev = 0; # was there any previous output? | |
print "[\n"; | |
while (<>) { | |
chomp; | |
next if (/^#/ or /^\s*$/); | |
@f = split /\s*,\s*/; | |
if (defined($F{lon}) and defined($F{lat})) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generating the content of this file: | |
// ldapsearch -x -LLL -o ldif-wrap=no -b cn=Subschema -s base '(objectClass=subschema)' + | perl -ne 'print "$2 -> $1;\n" if /\bNAME\s*\x27(\w+)\x27.*?\bSUP\s+(\w+)/' | grep -v '^top ->' | |
// generating an svg from this file: | |
// dot -Tsvg ldap-objectClass-hierarchy.dot > ldap-objectClass-hierarchy.svg | |
digraph "openldap schemas" { | |
rankdir = LR; | |
overlap = scale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global $, document, console */ | |
$(document).ready(function (){ | |
// http://stackoverflow.com/questions/9898813/jquery-wait-till-multiple-get-requests-are-successully-processed | |
var f1 = 'https://raw.githubusercontent.com/g0v/potluckmap/gh-pages/data/shop-clothes.csv'; | |
var f2 = 'https://raw.githubusercontent.com/g0v/potluckmap/gh-pages/data/shop-gift.geojson'; | |
var clothes, gift; | |
clothes = $.get(f1); | |
gift = $.get(f2); | |
$.when(clothes, gift).done(init); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# LXC calls us with the following arguments: | |
# fwmp.lxc set $IP $hp1:$cp1 $hp2:$cp2 ... $cname net up veth $iface | |
# fwmp.lxc clear $IP $cname net down veth $iface | |
use strict; | |
my ($iface, undef, $when, undef, $cid, @ARGV) = reverse @ARGV; | |
@ARGV = reverse @ARGV; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/conda/bin/python | |
# -*- coding: utf-8 -*- | |
import sys, argparse | |
from keras.preprocessing import image | |
import numpy as np | |
parser = argparse.ArgumentParser(description='classify images') | |
parser.add_argument('-v', '--verbosity', type=int, | |
choices=range(3), default=2, help='increase output verbosity') |