Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html class="no-js" lang="fr">
<head>
<script>document.documentElement.className="js-off"</script>
#!/bin/sh
# any2pandoc.sh
#
# A shell script that tries its best to convert documents thrown at it
# to pandoc's extended markdown.
#
# https://gist.github.com/1181510
#
# Depends on:
@sashainparis
sashainparis / Install Bolt CM as a vendor
Last active August 29, 2015 13:59
Create a common Bolt CM installed as a vendor. To avoid putting everything in the app/ directory.
$ composer create-project w3wfr/bolt-vendor myboltsite
$ chgrp -R www-data files/ app/database/ app/cache/ app/config/ theme/
$ chmod -R g+w files/ app/database/ app/cache/ app/config/ theme/
$ composer create-project silex/silex silex
@sashainparis
sashainparis / chmods
Created October 27, 2013 22:12
chmod directories to 755 and files to 644 recursively.
$ find . -type d -exec chmod 755 {} +
$ find . -type f -exec chmod 644 {} +
@sashainparis
sashainparis / url css3 3d
Last active April 6, 2016 09:08
Recherche de code HTML5 + CSS3 pour démo 3D de ImageField CSS & MakeUp
http://cssdeck.com/labs/simple-css3-3d-cube
http://cssdeck.com/labs/css3-isometric-text-demo
http://cssdeck.com/labs/nice-3d-text
http://cssdeck.com/labs/pure-css-3d-primitives
http://cssdeck.com/labs/animated-leading-slats
# Pour la tâche cron, j'ai d'abord dû activer le compte root car certaines commandes ont besoin de privilèges :
sudo passwd root
# Puis ajouter la tâche cron :
sudo crontab -u root -e
* * * * * /home/djzu/wifi-repair-djzu.sh
# Ainsi, chaque minute, ma connexion wifi est vérifiée et réparée si nécessaire, de manière totalement transparente.
@sashainparis
sashainparis / find mv
Last active April 6, 2016 09:06
Move files with find - non recursive
find . -maxdepth 1 -iname '*.jpg' -exec mv '{}' Images/DiversJPG/ \;
find . -maxdepth 1 -iname '*.jpeg' -exec mv '{}' Images/DiversJPG/ \;
find . -maxdepth 1 -iname '*.xcf' -exec mv '{}' Images/DiversXCF/ \;
find . -maxdepth 1 -iname '*.pdf' -exec mv '{}' Documents/DiversPDF/ \;
find . -maxdepth 1 -iname '*.doc' -exec mv '{}' Documents/DiversOffice/ \;
find . -maxdepth 1 -iname '*.odp' -exec mv '{}' Documents/DiversOffice/ \;
@sashainparis
sashainparis / xmonad.hs
Created June 24, 2013 15:30
xmonad is a tiling window manager for Linux: http://xmonad.org/
-------------------- imports --------------------
--necessary
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import System.Exit
import Graphics.X11.Xlib
import System.IO (Handle, hPutStrLn)
@sashainparis
sashainparis / Symfony.Cmf.Bundle.BlogBundle.Document.Post.xml
Created June 11, 2013 17:39
Allow to use Create.js for Symfony/Cmf/BlogBundle. Place the xml file in the Resources/rdf-mappings directory. Below is a example file template for the Post content.
<type
xmlns:sioc="http://rdfs.org/sioc/ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
typeof="sioc:Post"
>
<children>
<property property="dcterms:title" identifier="title" tag-name="h1"/>
<property property="sioc:content" identifier="body" />
</children>