Skip to content

Instantly share code, notes, and snippets.

View fabiofdsantos's full-sized avatar

Fábio Santos fabiofdsantos

View GitHub Profile
@Khoulaiz
Khoulaiz / check_dyn_hostname
Created August 30, 2013 13:46
check dyndns hostname and reload iptables to reavaluate dynamic hostnames from iptables config. put this in a cronjob and you can use dyndns entries in iptables configs.
#!/bin/bash
# check dyndns name of a host and reset iptables if change was detected
HOSTNAME=<hostname-to-check.dyndns.org>
LOGFILE=/var/run/check_home_ip
Current_IP=$(/usr/bin/dig +short $HOSTNAME)
if [ $LOGFILE = "" ] ; then
iptables-restore </etc/iptables_rules
@sindresorhus
sindresorhus / jsonp-usage.js
Created February 24, 2012 12:38
JSONP function - Easily fetch remote JSONP files
// Example usage: Fetch it's own code from GitHub
JSONP( 'https://api.github.com/gists/1900694?callback=?', function( response ) {
console.log( 'JSONP function:', response.data.files['jsonp.js'].content );
});
@maettig
maettig / LICENSE.txt
Created February 3, 2012 16:02 — forked from 140bytes/LICENSE.txt
isValidEan13 in 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Thiemo Mättig <http://maettig.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mtigas
mtigas / gist:952344
Last active March 20, 2025 09:03
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: