This file contains hidden or 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
{# Todo : Manage dropdown and search form #} | |
{% macro navbar(items, active, options) %} | |
{% set active = active|default('home') %} | |
{% set options = { | |
'fixed': '', | |
'divider': ''|default(false), | |
'brand': '' | |
}|merge(options|default({})) | |
%} |
This file contains hidden or 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
// do online schema change | |
$alter = "ALTER TABLE ".$tableName." ADD ".$description ."; | |
try { | |
$osc = new OnlineSchemaChange($sock, $user, $pwd, $db, null, $alter); | |
// Return true on success or false on failure | |
return $osc->execute(); | |
} catch (Exception $e) { |
This file contains hidden or 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 good_indexes($sequence) { | |
$size_of_sequence = count($sequence); | |
$sum_lower_indexes = 0; | |
for ($i = 0; $i <= $size_of_sequence; $i++) | |
{ | |
if (!isset($sequence[$i])) | |
{ |
This file contains hidden or 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/sh | |
# Go in to the Geoip folder | |
cd /usr/share/GeoIP | |
# Download the new database of city | |
wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
# Download the new database of country | |
wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz |
This file contains hidden or 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
sudo rm /etc/localtime | |
sudo ln -s /usr/share/zoneinfo/UTC /etc/localtime | |
# now check it's ok | |
$ date | |
lun déc 5 10:03:47 UTC 2011 |
This file contains hidden or 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
// your_search can be : A, M, D, ?? | |
git status -s | grep 'your_search' | awk '{print $2}' |
NewerOlder