Version 3, 29 June 2007
Copyright Β© 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
<?php | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
<?php | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
} | |
?>hi |
Version 3, 29 June 2007
Copyright Β© 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
// Generates a URL-friendly "slug" from a provided string. | |
// For example: "This Is Great!!!" transforms into "this-is-great" | |
function generateSlug (value) { | |
// 1) convert to lowercase | |
// 2) remove dashes and pluses | |
// 3) replace spaces with dashes | |
// 4) remove everything but alphanumeric characters and dashes | |
return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, ''); | |
}; |
<?php | |
// Simple DNSBL/RBL PHP function - trust me, it's better than checkdnsrr, fsock, socket_create, Net::DNSBL and Net::DNS | |
// Here's a [better] way to quickly check if an IP is in a DNSBL / RBL. It works on Windows and Linux, | |
// assuming nslookup is installed. It also supports timeout in seconds. | |
function ipInDnsBlacklist($ip, $server, $timeout=1) { | |
$response = array(); | |
$host = implode(".", array_reverse(explode('.', $ip))).'.'.$server.'.'; | |
$cmd = sprintf('nslookup -type=A -timeout=%d %s 2>&1', $timeout, escapeshellarg($host)); | |
@exec($cmd, $response); |
# HOMEBREW CONFIG | |
# Move /usr/local/bin to the front of PATH by subbing it out and prepending | |
export PATH=/usr/local/bin:${PATH/\/usr\/local\/bin:/} | |
# add my user bin to PATH | |
export PATH=$PATH:~/bin | |
# stop checking for mail | |
unset MAILCHECK |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
# bitcoin.conf configuration file. Lines beginning with # are comments. | |
# Network-related settings: | |
# Run on the test network instead of the real bitcoin network. | |
#testnet=0 | |
# Connect via a socks4 proxy | |
#proxy=127.0.0.1:9050 | |
############################################################## |
<?php | |
/** | |
* PHP.Kryptik.AB Cleanup script | |
* | |
* Usage: place the script in same directory that contains files / directories | |
* to be scanned. Then run `php [script_name].php` and wait a bit | |
* | |
* @link http://blog.twelvecode.com | |
* @author Grzegorz Godlewski <[email protected]> |