Skip to content

Instantly share code, notes, and snippets.

@brunob
brunob / backup.sh
Created December 8, 2014 08:59
génération des fichiers de backup
#!/bin/bash
# Generation de la date du jour
date=$(date +%Y%m%d)
###
# Pamrametres du script
###
# Chemin du repertoire de la sauvegarde
@brunob
brunob / transfert_backup.sh
Last active August 29, 2015 14:10
transfert des fichiers de backup
#!/bin/sh
# generation des dates
date=$(date +%Y%m%d)
old=$(date +%Y%m%d -d '7 days ago')
# parametres
backup="/var/state/"$date
host=ftp.domain.tld
login=login-ftp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brunob
brunob / eathquake.mml
Created June 1, 2015 15:54
eathquake kosmtik
{
"bounds": [
-180,
-85.0511,
180,
85.0511
],
"center": [
0,
0,
@brunob
brunob / backup.sh
Created July 22, 2015 17:05
Simple backup
#!/bin/bash
date=$(date +%Y%m%d)
old=$(date +%Y%m%d -d '7 days ago')
###
# Pamrametres du script
###
# Chemin du repertoire de la sauvegarde
@brunob
brunob / phpcs.xml
Created December 8, 2015 19:57
PHP_CodeSniffer pour SPIP
<?xml version="1.0"?>
<ruleset name="SPIP">
<!--
Liens utiles
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
https://github.com/ucfcdl/fuelphp-phpcs/tree/master/Standards/FuelPHP
https://github.com/vanilla/addons/tree/master/standards/Vanilla
-->
<description>Coding rules for SPIP</description>
@brunob
brunob / .block
Last active February 1, 2017 22:34
Quotas départementaux grands cormorans
license: mit
border: none
height: 600
@brunob
brunob / cleanrss.html
Last active February 8, 2017 18:07
Un squelette SPIP qui prend l'url d'un flux RSS non valide en paramètre pour renvoyer le flux au propre. Pratique pour syndiquer certains flux WordPress (odgprod par exemple) dans Nextcoud. https://seenthis.net/messages/568088
#CACHE{0}
[(#HTTP_HEADER{Content-type: text/xml[; charset=(#CHARSET)]})]<?xml
version="1.0"[ encoding="(#CHARSET)"]?>
<rss version="2.0" [(#REM) rss 2.0.9)]
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
[(#SET{channel,#ENV{url}|analyser_site})]
<channel[ xml:lang="(#LANG)"]>
[<title>(#GET{channel}|table_valeur{nom_site}|textebrut|texte_backend)</title>]
@brunob
brunob / Fireworks.desktop
Last active February 17, 2017 12:17
Ubuntu launcher for Fireworks using wine / handling open with for jpeg and png files :)
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=env XMODIFIERS='' sh -c "winepath -w -0 %F | xargs -0 wine '/home/bb/.wine/drive_c/Program Files/Macromedia/Fireworks 8/Fireworks.exe'"
MimeType=image/png;image/jpeg;image/gif;
Name=Fireworks
Icon=/home/bb/.wine/drive_c/Program Files/Macromedia/Fireworks 8/FW9.png
@brunob
brunob / .block
Last active February 24, 2017 17:33
Quotas départementaux grands cormorans & couloirs de migration
license: mit
border: none
height: 630