From 4a6d55d3b65e7a4ab94422a07550d5358679f4e5 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 1 Jul 2018 19:27:38 +0200 Subject: Add some goot cheat --- cheat/.cheat/borg | 23 +++++++++++++++++++++++ cheat/.cheat/scp | 8 ++++++++ cheat/.cheat/symfony | 17 +++++++++++++++++ cheat/.cheat/traduction | 2 ++ cheat/.cheat/web_debug | 2 ++ cheat/.cheat/webfont | 11 +++++++++++ 6 files changed, 63 insertions(+) create mode 100644 cheat/.cheat/borg create mode 100644 cheat/.cheat/scp create mode 100644 cheat/.cheat/symfony create mode 100644 cheat/.cheat/traduction create mode 100644 cheat/.cheat/web_debug create mode 100644 cheat/.cheat/webfont diff --git a/cheat/.cheat/borg b/cheat/.cheat/borg new file mode 100644 index 0000000..0f7fb3f --- /dev/null +++ b/cheat/.cheat/borg @@ -0,0 +1,23 @@ +# init +borg init --encryption=repokey /path/to/repo + +# first commit +borg create /path/to/repo::Monday ~/src ~/Documents + +# update archive +borg create --stats /path/to/repo::Tuesday ~/src ~/Documents + +# For archive name with data instead of simple name +borg create /Backups/Docs_importants::{now:%Y-%m-%d} ~/Docs_importants + +# Example +borg create -C lzma,6 ~/Backups/Docs_importants::{now:%Y-%m-%d} ~/Docs_importants + +# Tips +borg save fullpath, so if already in subfolder, remove some leading path elements +with `strip-components`. Exemple: + +borg extract --strip-components 3 ~/Backups/Docs_importants::2018-07-01 + +# compression +lz4 < zstd < zlib < lzma diff --git a/cheat/.cheat/scp b/cheat/.cheat/scp new file mode 100644 index 0000000..0a632ec --- /dev/null +++ b/cheat/.cheat/scp @@ -0,0 +1,8 @@ +# To copy a file from your local machine to a remote server: +scp foo.txt user@example.com:remote/dir + +# To copy a file from a remote server to your local machine: +scp user@example.com:remote/dir/foo.txt local/dir + +# Option for select port +-P diff --git a/cheat/.cheat/symfony b/cheat/.cheat/symfony new file mode 100644 index 0000000..c76bc7a --- /dev/null +++ b/cheat/.cheat/symfony @@ -0,0 +1,17 @@ +# Generated a crud +php bin/console generate:doctrine:crud + +# Genenrates entities +php bin/console doctrine:generate:entities AppBundle:Film + +# Run dev server +php bin/console server:run + +# Drop database +php bin/console doctrine:database:drop --force + +# Create database +php bin/console doctrine:database:create + +# Create schema +php bin/console doctrine:schema:create diff --git a/cheat/.cheat/traduction b/cheat/.cheat/traduction new file mode 100644 index 0000000..a2553a1 --- /dev/null +++ b/cheat/.cheat/traduction @@ -0,0 +1,2 @@ +# Compil po file +msgfmt fr_FR.po -o fr_FR.mo diff --git a/cheat/.cheat/web_debug b/cheat/.cheat/web_debug new file mode 100644 index 0000000..a7a3cbf --- /dev/null +++ b/cheat/.cheat/web_debug @@ -0,0 +1,2 @@ +# Web redirection testing with wget +wget -O/dev/null --no-check-certificate http://noria.lan/board 2>&1 | grep -P "(301|Location)" diff --git a/cheat/.cheat/webfont b/cheat/.cheat/webfont new file mode 100644 index 0000000..be47382 --- /dev/null +++ b/cheat/.cheat/webfont @@ -0,0 +1,11 @@ +# Permet de générer un woff2 +woff2_compress mafont.ttf + +# Permet de générer un woff sans EOT et SVG car il le fait par défaut +webify mafont.ttf ---no-eot --no-svg + +# En une seul ligne +$font=mafont.ttf; woff2_compress $font; webify $font --no-eot --no-svg + +# Css tips: +If webfont is loaded with "?xxxxx" at the end of the file, the "xxxxx" must be changed. -- cgit v1.2.1