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
# ---------------------------------------------------------------------- | |
# Better website experience for IE users | |
# ---------------------------------------------------------------------- | |
# Force the latest IE version, in various cases when it may fall back to IE7 mode | |
# github.com/rails/rails/commit/123eb25#commitcomment-118920 | |
# Use ChromeFrame if it's installed for a better experience for the poor IE folk | |
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> |
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
<?php | |
function authenticate( $fromLogin=FALSE ) | |
{ | |
global $gorumuser, $gorumroll, $gorumauthlevel, $gorumrecognised; | |
global $autoLogout, $autoLogoutTime, $cookiePath, $testauth, $now; | |
global $dontSetLastClickTime, $includeGuestsInCurrentlyOnline; | |
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
die(print_r(ip_details("8.8.8.8"))); | |
function ip_details($ip) | |
{ | |
//list of providers to return IP information for free | |
$providers = array( 'ipinfo' => array('url' => "http://ipinfo.io/{$ip}/json", | |
'country_code' => 'country', | |
'country' => 'country', | |
'city' => 'city', | |
'region' => 'region', |
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
<? | |
set_time_limit(0); | |
ini_set('memory_limit', '1024M'); | |
include("initdirs.php"); | |
include(NOAH_APP . "/config.php"); | |
include(NOAH_APP . "/constants.php"); | |
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
################# | |
# FTP Backup Script | |
# Backup for files and MySQL, uploads to FTP and deletes old files. | |
# Chema@garridodiaz.com | |
# 2013-08-26 | |
# GPLv3 | |
################# | |
################# |
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
################# | |
# FTP AWS Backup Script | |
# Backup for AWS, uploads to FTP and deletes old files. | |
# chema@yclas.com | |
# You need to install AWS CLI read more here http://martinbuberl.com/blog/backup-amazon-s3-bucket-with-aws-cli/ | |
# 2015-07-20 | |
# GPLv3 | |
################# | |
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
<?php defined('SYSPATH') or die('No direct script access.');?> | |
<?if (Model_Category::current()->loaded() AND Model_Category::current()->id_category!=1):?> | |
<?=View::factory('pages/ad/listing_overview')?> | |
<?else:?> | |
the HMTL you had before that loads categories | |
<?endif?> |
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
Verifying I am +chema on my passcard. https://onename.com/chema |
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
<?php | |
class FraudLabsPro { | |
private $apiKey; | |
public function __construct($apiKey=''){ | |
if(!preg_match('/^[A-Z0-9]{32}$/', $apiKey)) | |
throw new exception('FraudLabsPro: Invalid API key provided.'); | |
$this->apiKey = $apiKey; | |
} |
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
#bin/bash | |
folders=(folder1 /my/otherfolder/ /var/www/openclassifieds2/) | |
for i in "${folders[@]}" | |
do | |
foo+=(--tab -e "bash -c 'cd "$i";git pull;git status';bash") | |
done | |
gnome-terminal "${foo[@]}" |