Skip to content

Instantly share code, notes, and snippets.

@tech-nova
tech-nova / xfdf.php
Created December 4, 2015 14:09 — forked from collegeman/xfdf.php
Generate xFDF in PHP
<?php
/*
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto
Version 1.1
Last Modified: 2010-02-17
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
@tech-nova
tech-nova / actu-tumblr-DATA-et-YQL.html
Last active September 12, 2015 14:53
Comment récupérer les derniers posts sur tumblr, avec la syndication, la boucle DATA et YQL. C'est moins rapide qu'en utilisant l'API (https://gist.github.com/tech-nova/08a54e50809b60b9a84a)
<BOUCLE_content(SITES){id_syndic=1}>
[(#REM) Articles issus de la syndication ]
<B_articles>
<div class="masonry-container">
<BOUCLE_articles(SYNDIC_ARTICLES) {id_syndic} {!par date} {0,6}>
<div class='masonry mod modBlogPost'>
#SET{url, #LISTE{"select * from html where url=",#URL_ARTICLE," and xpath='//meta[@property=\'og:image\']'"}|implode{'"'}}
#SET{lien,#URL_ARTICLE}
@tech-nova
tech-nova / actu-tumblr.html
Created September 12, 2015 10:50
Récupérer facilement les derniers posts de Tumblr avec la boucle DATA de SPIP
<BOUCLE_getPosts(DATA){source xml, http://#####.tumblr.com/api/read/?num=6}
{datapath posts}
{2,1}
><B_post>
<div class="masonry-container">
<BOUCLE_post(DATA){source table,#VALEUR}>
<div class='masonry mod modBlogPost'>
[(#VALEUR{type}|=={photo}|oui)
[<a href="#VALEUR{url-with-slug}">
<img src="(#VALEUR{0/photo-url/0}
@tech-nova
tech-nova / www.wp-kickstart.com.conf
Last active August 29, 2015 14:28 — forked from tomazzaman/www.wp-kickstart.com.conf
wp-kickstart.com Nginx vhost config
server {
include /home/webmaster/www/www.wp-kickstart.com.conf;
server_name www.wp-kickstart.com;
listen 443 ssl spdy;
server_tokens off;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
@tech-nova
tech-nova / hhvm.conf
Last active August 29, 2015 14:28 — forked from tomazzaman/hhvm.conf
Monit configurations for commonly used services
check process hhvm with pidfile /var/run/hhvm/pid
group hhvm
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds
stop program = "/usr/sbin/service hhvm stop"
if failed unixsocket /var/run/hhvm/hhvm.sock then restart
if mem > 400.0 MB for 1 cycles then restart
if 5 restarts with 5 cycles then timeout
@tech-nova
tech-nova / mes_options_avec_jql.php
Last active August 29, 2015 14:26
Utilisation de jQl dans SPIP via mes_options
extrait de http://thread.gmane.org/gmane.comp.web.spip.zone/36819/focus=36825
-----------------------------------------------------------------------------
Tu peux avantageusement le mettre en place facilement dans
ton squelettes/mes_options.php avec le code suivant (et en mettant le fichier jQl.min.js dans le même
dossier) :
<?php