This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os/exec" | |
| ) | |
| func main() { | |
| cmd := exec.Command("tail", "-f", "./test.log") |
This file contains hidden or 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
| ssh-keyscan -t dsa,rsa,ecdsa hostname 2>/dev/null|perl -MMIME::Base64 -MDigest::SHA=sha1_hex,sha256_hex -lane 'sub k2fp {my $k=shift;$k=decode_base64($k);return (sha1_hex($k),sha256_hex($k));};my ($h,$t,$f)=@F;$t=1 if $t eq "ssh-dss";$t=2 if $t eq "ssh-rsa";$t=3 if $t eq "ecdsa-sha2-nistp256";my ($s1,$s256)=k2fp $f;print "$h. 86400 IN SSHFP $t 1 $s1";print "$h. 86400 IN SSHFP $t 2 $s256";' |
Warning: Filter API is not stable yet.
Filters are not triggered when sending e-mail directly using the sendmail command.
This file contains hidden or 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
| // Copyright (c) 2017 Ismael Celis | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all |
This file contains hidden or 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
| # The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| # | |
| # Current known FCC address ranges: | |
| # https://news.ycombinator.com/item?id=7716915 | |
| # | |
| # Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
| # | |
| # In your nginx.conf: | |
| location / { |
This file contains hidden or 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
| WITH table_scans as ( | |
| SELECT relid, | |
| tables.idx_scan + tables.seq_scan as all_scans, | |
| ( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes, | |
| pg_relation_size(relid) as table_size | |
| FROM pg_stat_user_tables as tables | |
| ), | |
| all_writes as ( | |
| SELECT sum(writes) as total_writes | |
| FROM table_scans |
This file contains hidden or 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
| import os | |
| import numpy | |
| from pandas import DataFrame | |
| from sklearn.feature_extraction.text import CountVectorizer | |
| from sklearn.naive_bayes import MultinomialNB | |
| from sklearn.pipeline import Pipeline | |
| from sklearn.cross_validation import KFold | |
| from sklearn.metrics import confusion_matrix, f1_score | |
| NEWLINE = '\n' |
This file contains hidden or 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
| """ | |
| Thread pool extensions to SocketServer. | |
| """ | |
| import Queue | |
| import SocketServer | |
| import sys | |
| import threading |
This file contains hidden or 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
| # $OpenBSD: smtpd.conf,v 1.5 2012/10/11 21:16:28 gilles Exp $ | |
| # This is the smtpd server system-wide configuration file. | |
| # See smtpd.conf(5) for more information. | |
| myname = "mta.example.jp" | |
| # To accept external mail, replace with: listen on all | |
| # listen on interface [port port] [tls | smtps] [certificate name] [enable auth] | |
| listen on 127.0.0.1 hostname "localhost" |
NewerOlder