Mensuel Shaarli

Tous les liens d'un mois sur une page.

March, 2016

Strip - A Less Intrusive Responsive Lightbox

Petit outil jQuery qui permet de faire apparaître des incrustations d'images ou de vidéos.

Template pour dessin d'écran papier et maquette
thumbnail
14 ressources Javascript pour booster l'UX de votre interface | Webdesigner Trends
thumbnail

Ce nouvel article regroupe différents plug-ins que vous pourrez implémenter à votre guise dans vos sites. Couvrants plusieurs domaines, vous y trouverez des éléments pour traiter vos images, gérer le chargement d’une page, améliorer la recherche et bien plus encore.

Selectize.js

Lib permettant de faire des textbox/select hybride

GitHub - jkbrzt/httpie: CLI HTTP client, user-friendly curl replacement with intuitive UI, JSON support, syntax highlighting, wget-like downloads, extensions, etc.
thumbnail

Un outil permettant de lancer des requêtes en ligne de commande (comme cURL) mais en étant plus simple d'utilisation et avec des retour mis en forme

GitHub - kennethreitz/records: SQL for Humans™
thumbnail

Une bibliothèque Python permettant de faire facilement des exports de résultats de requête SQL (tableau, json, yaml, ...)

Découvrez GrapeJs, un éditeur de template open source que vous pourrez ajouter à vos projets | BlogDuWebdesign
thumbnail

GrapeJs, un éditeur de template open source que vous pourrez ajouter à vos projets

Project Ace - Cordova Plugin for Native UI

Un plugin Cordova pour utiliser des éléments graphiques natifs avec du HTML

baguetteBox.js | Demo

Un lightbox en pure JS sans dépendance

Self-Documented Makefile
thumbnail

Faire un makefile auto documenté (visible et joli)

Script de correction d'une table en arbre avec des parent_id
thumbnail

DROP PROCEDURE IF EXISTS tree_recover;

DELIMITER //

CREATE PROCEDURE tree_recover ()
MODIFIES SQL DATA
BEGIN

DECLARE currentId, currentParentId  CHAR(36);
DECLARE currentLeft                 INT;
DECLARE startId                     INT DEFAULT 1;

# Determines the max size for MEMORY tables.
SET max_heap_table_size = 1024 * 1024 * 512;

START TRANSACTION;

# Temporary MEMORY table to do all the heavy lifting in,
# otherwise performance is simply abysmal.
CREATE TABLE `tmp_tree` (
    `id`        char(36) NOT NULL DEFAULT '',
    `parent_id` char(36)          DEFAULT NULL,
    `lft`       int(11)  unsigned DEFAULT NULL,
    `rght`      int(11)  unsigned DEFAULT NULL,
    PRIMARY KEY      (`id`),
    INDEX USING HASH (`parent_id`),
    INDEX USING HASH (`lft`),
    INDEX USING HASH (`rght`)
) ENGINE = MEMORY
SELECT `id`,
       `parent_id`,
       `lft`,
       `rght`
FROM   `tree`;

# Leveling the playing field.
UPDATE  `tmp_tree`
SET     `lft`  = NULL,
        `rght` = NULL;

# Establishing starting numbers for all root elements.
WHILE EXISTS (SELECT * FROM `tmp_tree` WHERE `parent_id` IS NULL AND `lft` IS NULL AND `rght` IS NULL LIMIT 1) DO

    UPDATE `tmp_tree`
    SET    `lft`  = startId,
           `rght` = startId + 1
    WHERE  `parent_id` IS NULL
      AND  `lft`       IS NULL
      AND  `rght`      IS NULL
    LIMIT  1;

    SET startId = startId + 2;

END WHILE;

# Switching the indexes for the lft/rght columns to B-Trees to speed up the next section, which uses range queries.
DROP INDEX `lft`  ON `tmp_tree`;
DROP INDEX `rght` ON `tmp_tree`;
CREATE INDEX `lft`  USING BTREE ON `tmp_tree` (`lft`);
CREATE INDEX `rght` USING BTREE ON `tmp_tree` (`rght`);

# Numbering all child elements
WHILE EXISTS (SELECT * FROM `tmp_tree` WHERE `lft` IS NULL LIMIT 1) DO

    # Picking an unprocessed element which has a processed parent.
    SELECT     `tmp_tree`.`id`
      INTO     currentId
    FROM       `tmp_tree`
    INNER JOIN `tmp_tree` AS `parents`
            ON `tmp_tree`.`parent_id` = `parents`.`id`
    WHERE      `tmp_tree`.`lft` IS NULL
      AND      `parents`.`lft`  IS NOT NULL
    LIMIT      1;

    # Finding the element's parent.
    SELECT  `parent_id`
      INTO  currentParentId
    FROM    `tmp_tree`
    WHERE   `id` = currentId;

    # Finding the parent's lft value.
    SELECT  `lft`
      INTO  currentLeft
    FROM    `tmp_tree`
    WHERE   `id` = currentParentId;

    # Shifting all elements to the right of the current element 2 to the right.
    UPDATE `tmp_tree`
    SET    `rght` = `rght` + 2
    WHERE  `rght` > currentLeft;

    UPDATE `tmp_tree`
    SET    `lft` = `lft` + 2
    WHERE  `lft` > currentLeft;

    # Setting lft and rght values for current element.
    UPDATE `tmp_tree`
    SET    `lft`  = currentLeft + 1,
           `rght` = currentLeft + 2
    WHERE  `id`   = currentId;

END WHILE;

# Writing calculated values back to physical table.
UPDATE `tree`, `tmp_tree`
SET    `tree`.`lft`  = `tmp_tree`.`lft`,
       `tree`.`rght` = `tmp_tree`.`rght`
WHERE  `tree`.`id`   = `tmp_tree`.`id`;

COMMIT;

DROP TABLE `tmp_tree`;

END//

DELIMITER ;

TUTO Gratuit : Optimisez votre référencement mobile en 4 étapes avec Referencement SEO sur Tuto.com
LOL Colors - Curated color palette inspiration

Palette de couleurs pour insipration

40 Creative & Funny 404 Pages You'll Love
Mini Icons | Squid Ink Professional Web Icons
thumbnail
Un référentiel national ouvert : de l'adresse à la coordonnée géographique - adresse.data.gouv.fr

Une API pour rechercher des adresses

GitHub - php-pm/php-pm: PPM is a process manager, supercharger and load balancer for PHP applications.
thumbnail

apparemment php-pm boosterait les performances jusqu'à 15x sur une application symfony utilisant php-fpm, à tester

httpbin(1): HTTP Client Testing Service

Un outil permettant d'obtenir des informations sur la requête HTTP envoyée

Request Bin
thumbnail

Un outil pour faire des tests sur des requêtes HTTP

Cookies & traceurs : que dit la loi ?

Un article pour savoir si l'on doit ou pas mettre l'avertissement pour les cookies sur les sites internet

Instant Logo Search

Un moteur de recherche sur plein de logo

GitHub - marmelab/awesome-rest: A collaborative list of great resources about RESTful API architecture, development, test, and performance
thumbnail

Des ressources pour créer des API REST

FindA.Photo: 10,000 completely free stock photos to use for any purpose

10000 photos libre (CC0) avec un moteur de recherche (par couleur, par mot clé)

GitHub - dthree/cash: Cross-platform Linux without the suck
thumbnail

Un Cygwin like fait avec nodeJS