This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
If you are new to CodeIgniter you may be confused as to when you need to use get_instance and when you don't, it certainly tripped me up when I first came back to CodeIgniter after leaving the PHP community for some time. | |
Luckily it is pretty simple to remember. | |
If you are writing code that lives within a controller, a model or a view that is under CodeIgniter's control then you do not need to use get_instance. | |
If however you are writing your own custom libraries or something that sits outside of the MVC files then you do need to use it. | |
So, if you are inside a model you could do something like this; |
Following instructions at
Install
sudo yum -y install boost expect perl perl-DBI openssl zlib snappy libaio
wget https://downloads.mariadb.com/ColumnStore/1.0.8/centos/x86_64/7/mariadb-columnstore-1.0.8-1-centos7.x86_64.rpm.tar.gz
#Unset all Cookies! | |
Header unset Cookie | |
Header unset Set-Cookie | |
<IfModule mod_expires.c> | |
# Enable expirations | |
ExpiresActive On | |
# Default directive | |
ExpiresDefault "access plus 1 month" | |
# My favicon |
Header unset Cookie | |
Header unset Set-Cookie |
<?php | |
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { | |
$ip = $_SERVER['HTTP_CLIENT_IP'];} | |
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} else { | |
$ip = $_SERVER['REMOTE_ADDR']; | |
} | |
$url = "http://api.wipmania.com/".$ip; | |
$country = file_get_contents($url); //ISO code for Nigeria it is NG check your country ISO code |
wget http://akamaras.com/bench.sh | |
sh bench.sh |
//Create a File | |
$my_file = 'file.txt'; | |
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //implicitly creates file | |
//Open a File | |
$my_file = 'file.txt'; | |
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //open file for writing ('w','r','a')... | |
//Read a File | |
$my_file = 'file.txt'; |
# -----------------------Force https---------------------------------------------------------- | |
RewriteEngine On | |
# This will enable the Rewrite capabilities | |
RewriteOptions InheritDownBefore | |
# This prevents the rule from being overrided by .htaccess files in subdirectories. | |
RewriteCond %{HTTPS} !=on | |
# This checks to make sure the connection is not already HTTPS |
function CleanUp_Cache_Folder(){ | |
## Automatic cleanup Cache folder | |
$cache_folder = 'cache/'; | |
$file_type = '*.mp3'; | |
$files = glob($cache_folder.$file_type); | |
$time = time(); | |
foreach ($files as $file) | |
if (is_file($file)) | |
if ($time - filemtime($file) >= 60*60*24*1) // 1 days |