Skip to content

Instantly share code, notes, and snippets.

/* Test du port parallele et afficheur LCD
* Broche LCD Enable sur Broche Init du port //
* Broche LCD RegisterSelect sur Broche Strobe sur port //
* Compiler avec gcc lcd.c -o lcd -lm
* Pour sortir proprement Ctrl+D puis Enter
*/
#include <sys/ioctl.h>
#include <string.h>
#include <fcntl.h>
<?php
// Inclusion des librairies
include "include/fpdf.class.php";
define("TVA",0.196);
/**
* Classe PDF hérite de fpdf, permet de générer des fichiers PDF
*/
class pdf extends fpdf{
<?php
public function getJoomlaVersion($format='short'){
$method = 'get' . ucfirst($format) . "Version";
// Get the joomla version
$instance = new JVersion();
$version = call_user_func(array($instance, $method));
return $version;
}
?>
@Jiwoks
Jiwoks / initopo.php
Created June 10, 2013 12:26
This gist takes a Joomla language file and export as a po language file
<?php
/**
* Php cli script
* @param string file to convert
* @param string file to save
**/
if(empty($argv[1])){
die('You have to pass as first argument the file to parse');
}
jQuery(document).ready(function($) {
$('.heapshot').heapshot({
'indexStart' : 100,
'rotation' : 80,
'easing' : function(x, t, b, c, d){return c*t/d + b;},
'overflowparents' : true,
'autostart' : true,
'animationdelay' : 1500
});
});
jQuery(document).ready(function($) {
$('.heapshot').heapshot();
});
<ul class="heapshot">
<li><img src="img/1.jpg" /></li>
<li><img src="img/2.jpg" /></li>
<li><img src="img/3.jpg" /></li>
<li><img src="img/4.jpg" /></li>
<li><img src="img/5.jpg" /></li>
<li><img src="img/6.jpg" /></li>
</ul>
@Jiwoks
Jiwoks / heapshot-exemple-1.html
Created April 5, 2013 20:03
Heapshot insert
<link rel="stylesheet" href="css/heapshot.css">
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.imagesloaded.min.js" type="text/javascript"></script>
<script src="jQueryRotate.min.js" type="text/javascript"></script>
<script src="jquery.heapshot.js" type="text/javascript"></script>
@Jiwoks
Jiwoks / myComponentComponentHelper.php
Last active December 11, 2015 06:29
Class that extends the joomla Component Helper. You can update components parameters with this class, get the manifest vars and the version of the component
<?php
// Code under GPL V3 Licence http://www.gnu.org/licenses/gpl.html
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.helper');
class myComponentComponentHelper extends JComponentHelper {
/**
* Method to set config parameters