Skip to content

Instantly share code, notes, and snippets.

echo '<pre>';
print_r(get_category());
echo '</pre>';
@will83
will83 / functions.php
Last active August 29, 2015 14:00
Wordpress function.php include function
<?php
if ( ! function_exists( 'get_function_files' ) ) {
function get_function_files($path){
$function_files = glob($folder.$path, GLOB_BRACE);
foreach($function_files as $function_file){
if (substr($function_file, -8) != '-off.php'){
require_once($function_file);
}
}
}
@will83
will83 / counter_increment.html
Last active August 29, 2015 13:56
Increment multiple counters each second with jquery (with decimals)
<!-- Don't forget to include jquery -->
<!-- the markup -->
<span class="counter" data-increment-value="0.07" data-increment-time="1000">1000.45</span>
<span class="counter" data-increment-value="0.03" data-increment-time="100">814.73</span>
<!-- the script -->
<script>
$( ".counter" ).each(function() {
// Get initial value (span value) as a number
@will83
will83 / gist:5920606
Last active May 13, 2025 07:50
Fonction PHP permettant la conversion de Lambert93 à WGS84 (selon le fichier fourni par l'IGN).
<?php
function lambert93ToWgs84($x, $y){
$x = number_format($x, 10, '.', '');
$y = number_format($y, 10, '.', '');
$b6 = 6378137.0000;
$b7 = 298.257222101;
$b8 = 1/$b7;
$b9 = 2*$b8-$b8*$b8;
$b10 = sqrt($b9);
$b13 = 3.000000000;