Scratchpad
¥€$
aide-memoire_bash.txt
Préférences Sublime Text
Unicode subscripts and superscripts ᵉʳ
Alphabet grec
1. A alpha Α α
2. B bêta Β β ϐ
3. G gamma Γ γ
4. D delta Δ δ
5. E epsilon Ε ε
6. Z dzêta Ζ ζ
7. H êta Η η
8. TH thêta Θ ϴ θ ϑ
9. I iota Ι ι
10. K kappa Κ κ ϰ
11. L lambda Λ λ
12. M mu Μ μ
13. N nu Ν ν
14. X xi Ξ ξ
15. O omicron Ο ο
16. P pi Π π ϖ
17. R rhô Ρ ρ ϱ
18. S sigma Σ σ ς
19. T tau Τ τ
20. U upsilon Υ υ ϒ
21. PH phi Φ φ ϕ
22. CH khi Χ χ
23. PS psi Ψ ψ
24. O omega Ω ω
∽oOo~
#!/bin/bash
#!/usr/bin/python
# -*- coding: utf-8 -*-
or
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Bash Time
TIMEFORMAT='time : %3R s'; time( ls )
# Regexp to find <p>...</p>
<p>(?<=\<p>).*?(?=</p>)</p>
# Regexp to find missing «
(?<=\»)[^«]*?(?=»)
# Regexp to find entities
&(?<=\&).*?(?=;);
# Trouver tous les IP assignées du réseau avec port 22 ouvert
nmap -sP -PS22 192.168.1.0/24
# GraphicsMagick.org
# http://www.graphicsmagick.org/GraphicsMagick.html
file=`date "+%Y-%m-%d_%H-%M-%S_out.pdf"`; gm convert *.tiff -monochrome -compress Fax $file
# Convert EPS to PNG with transparent background
FILE=myFile; gm convert -density 200 -transparent white $FILE.eps $FILE.png;
# Convert JPEG’s from Apple’s Image Capture.app to PDF
#!/bin/bash
filelist=`ls -1 *.jpeg | sort -n -k2 | while read -r i; do printf "'$i' "; done`
fileout=`date "+%Y-%m-%d_%H-%M-%S_out.pdf"`
eval "gm convert -quality 10 -level 20%,1,85% $filelist $fileout"
# ImageMagick.org
# http://www.imagemagick.org/Usage/formats/#pdf
file=`date "+%Y-%m-%d_%H-%M-%S_out.pdf"`; convert *.tiff -monochrome -compress Group4 $file; open $file
convert *.tiff *.tif *.png *.jpg *.jpeg -alpha off -monochrome -compress Group4 -quality 100 -units PixelsPerInch -density 300 `date "+%Y-%m-%d_%H-%M-%S_out.pdf"`
convert -density 600 in.pdf `date "+%Y-%m-%d_%H-%M-%S_out.png"`
# Convert to jpeg quality 70 in sibling folder "out"
for pic in *.jpg ; do echo "$pic" ; convert "$pic" -quality 70 "../out/${pic%.jpg}.jpeg" ; done
# Créer des thumbnails
mkdir ../thumbs; for pic in *.* ; do echo "$pic" ; convert "$pic" -thumbnail 'x150' "../thumbs/${pic}" ; done
# Créer des thumbnails de même taille pour Wordpress Gallery (le flag -define sert à rendre le processus plus rapide)
mkdir ../thumbs; for pic in *.* ; do echo "$pic" ; convert -define jpeg:size=220x170 "$pic" -thumbnail 110x85^ -gravity center -extent 110x85 "../thumbs/thumbs_${pic}" ; done
# Créer des thumbnails avec un nom incrémenté
i=0; for pic in *.jpg ; do echo "$pic"; let i=$i+1 ; fname=`printf "../out/nouveau_nom_%03d.jpg" $i`; convert "$pic" -quality 70 -thumbnail '1000x' $fname; done
# Créer un pdf à partir d’une image jpeg en gardant une taille de fichier similaire
gm convert -compress jpeg in.jpeg out.pdf
# PDFtk
pdftk *.pdf cat output out.pdf
# POPPLER (install with MacPorts)
pdftohtml in.pdf # Create html files + extract images
# Bash Rename
i=0; for NAME1 in *.JPG ; do echo "$NAME1"; let i=$i+1 ; NAME2=`printf "NEW-NAME_%03d.jpg" $i`; mv $NAME1 $NAME2; done
# Fichier URL
# Créer un lien web cliquable dans le Finder
# Enregistrer sous monFichier.url
# TOUJOURS FINIR PAR UN LF !!!
[InternetShortcut]
URL=http://www.google.ch/
# Open BBEdit front document in Marked.
try
tell application "BBEdit"
set myFile to get file of front document of window 1
end tell
tell application "Marked"
activate
open myFile
end tell
end try
# Liste des CDN courants
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js">
<script src="https://code.jquery.com/jquery-1.11.3.min.js">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
⇥
⇧
⌃
⌥
⌘
↵
¶
❡
♥♥♥♥
♡♡♡♡
☀☀☀☀
♂♀►◄▲▼
▶◼
♫♪♫♬
♩♪♫♬♮♯♭
¶
http://chexed.com/ComputerTips/asciicodes.php
±×ºØ·αΣρΩΔ¼½¾⅓⅔⅛⅜⅝⅞çɵ≤≥
Exposants : ⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿⁱ
Indices : ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₔ
Asterisk
✻
❤ ❥ 웃 유 ♋ ☮ ✌ ☏ ☢ ☠ ✔ ☑ ♚ ▲ ♪ ✈ ❞ ¿
♥ ❣ ♂ ♀ ☿ Ⓐ ✍ ✉ ☣ ☤ ✘ ☒ ♛ ▼ ♫ ⌘ ❝ ¡
♡ ღ ツ ☼ ☁ ❅ ♒ ✎ © ® ™ Σ ✪ ✯ ☭ ➳ 卐 ✞
℃ ℉ ° ✿ ϟ ☃ ☂ ✄ ¢ € £ ∞ ✫ ★ ½ ☯ ✡ ☪
→
←
↓
↑
⇐
⇑
⇒
⇓
⇔
⇕
⇖
⇗
⇘
⇙
༒
࿃
࿇
࿈
࿉
࿊
࿋
࿌
༗
༺༻
༼༽
༿༾
༶
ཿ
࿂
྾
྿
࿀
࿁
࿂
࿃
࿄
࿅
࿆࿆࿇
࿈
࿉
࿊
࿋
࿌
࿏
᠀
᠁
᠂
᠃
᠄
᠅
᠆
᠇
᠈
᠉
᠊
᠐
᠑
᠒
⁂
•
‣
⁑
⁓
⁕
⁖
⁘
⁙
⁚
⁛
⁜
⁝
⁞
⃛
⃜
ℂℕℙℚℝ
ↀ
ↁ
ↂ
∆
∇
∴
∵
∶
∷
≺≻
⊰⊱
⋰⋱
⍫⍬
─┐
⚢
⚣
⚥
⚦
⚧
⚨
⚩
⚪
⚫
⚬
⚭
⚮
⚯
♡
♨