Skip to content

Instantly share code, notes, and snippets.

View openstrike's full-sized avatar
💭
Migrating repos to Gitlab which isn't owned by Microsoft

Pete Houston openstrike

💭
Migrating repos to Gitlab which isn't owned by Microsoft
View GitHub Profile
@dallaylaen
dallaylaen / todo.t
Last active August 25, 2017 09:01
Make Perl module developer feel bad about untested code
#!/usr/bin/env perl
# This script tests nothing (except the fact that modules load w/o warnings).
# However, it tries to load them all.
# This means that untested modules would also be included into
# code coverage summary, lowering total coverage to its actual value.
# I.e. having a well-covered module and a totally uncovered one will result
# in 50% coverage which is probably closer to truth.
@robinhouston
robinhouston / prisoners_japh.pl
Created January 21, 2016 14:02
A Perl program using only the characters &+-.:<=>acemnorsuvwxz~ – see http://bumppo.net/lists/fun-with-perl/2001/01/msg00019.html
s==x= && s==.er & xac.uc coer= && s==m--+m--+m--+m--=e &&
s==xac.~o= && s=.+=<<x& evam=ee &&
eva~
x
s=c.=c= && s=x=xz&<<o=e &&
xm
o
s=x=x = && s=x=<<xc& <<xo =e&&
x~
xc
@d-tux
d-tux / update-blocklist.sh
Created January 15, 2016 09:12
ipset blocklist updater
#!/bin/bash
# Adapted from http://www.linuxjournal.com/content/server-hardening?page=0,2
PATH=$PATH:/sbin
WD=`pwd`
TMP_DIR=$WD/tmp
IP_TMP=$TMP_DIR/ip.temp
IP_BLOCKLIST=$WD/ip-blocklist.conf
IP_BLOCKLIST_TMP=$TMP_DIR/ip-blocklist.temp
list="nigerian russian lacnic exploited-servers"
@windytan
windytan / dark_cpan.pl
Created December 11, 2014 22:56
dark perldoc & CPAN
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document
domain('cpan.org')
{
html, body, tbody, tr, td, div { background-color: #232323 !important; color: #ccc !important }
pre {
display: block !important ;
background-color: #333333 !important ;
border: #777777 solid 0.1em !important ;
@TheCloudlessSky
TheCloudlessSky / intermediate_ca.crt
Created October 4, 2014 12:58
GeoTrust Intermediate Certificates
-----BEGIN CERTIFICATE-----
MIIETzCCAzegAwIBAgIDAjpvMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTMxMTA1MjEzNjUwWhcNMjIwNTIwMjEzNjUwWjBEMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3Qg
U1NMIENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjvn4K
hqPPa209K6GXrUkkTdd3uTR5CKWeop7eRxKSPX7qGYax6E89X/fQp3eaWx8KA7UZ
U9ulIZRpY51qTJEMEEe+EfpshiW3qwRoQjgJZfAU2hme+msLq2LvjafvY3AjqK+B
89FuiGdT7BKkKXWKp/JXPaKDmJfyCn3U50NuMHhiIllZuHEnRaoPZsZVP/oyFysx
j0ag+mkUfJ2fWuLrM04QprPtd2PYw5703d95mnrU7t7dmszDt6ldzBE6B7tvl6QB
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
#!/usr/bin/perl
# libx264-hq-ts.preset -> http://d.hatena.ne.jp/munepi/20091227/1261941397
use strict;
use warnings;
use File::Basename;
use YAML::Syck;
use constant {
FFMPEG_DIR => '/home/ec/src/ffmpeg_x264/ffmpeg', # 自分でコンパイルした ffmpeg のあるディレクトリ, ffmpeg は FFMPEG_DIR/ffmpeg にあることになる