🎯 Objectif du projet

Explique ce que tu vas construire.


🧱 Prérequis

  • Matériel
  • Logiciel
  • Niveau requis

⚙️ Étapes

1. Étape 1

Explication

Texte alternatif.

2. Étape 2

Explication


🧪 Résultat

Montre ce que ça donne. Google est ton ami


⚠️ Problèmes rencontrés

  • Problème 1
Emoji Nom Hex Dec Prix
😀 GRINNING FACE 😀 😀 0.05 €
😂 FACE WITH TEARS OF JOY 😂 😂 0.12 €
🤣 ROLLING ON THE FLOOR LAUGHING 🤣 🤣 0.09 €
  • Solution

🚀 Améliorations possibles

  • Idée 1
  • Idée 2

🔗 Ressources utiles

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function lorem(){
	# Copy lorem ipsum to your clipboard in OS X

	# usage:

	# $ lorem <int> <htmlflag>

	# where <int> is how many paragraphs of lorem ipsum you want, each separated by 2 newlines
	# and <htmlflag> is anything, indicating you want each paragraph surrounded by <p></p>. Omit if you don't want this.

	# Explanations

	# This is our source lorem ipsum text.
	lorem='Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'

	# Here we are gathering the <int> argument.
	count=$(( $1 ))

	# The minimum is 1 lorem ipsum, so enforce that here.
	if [[ "$count" -lt 1 ]];
	then
		count=$(( $count + 1 ))
	fi

	# This is the variable that will hold our output.
	text=''

	# Iterate until our count is zero. Decrement each iteration.
	while [ "$count" -gt 0 ];
	do
		# Append the lorem ipsum again.
		# Check if we should add a beginning <p> tag.
		if [[ $2 != '' ]];
		then
			text=$text'<p>'$lorem'</p>'
		else
			text=$text$lorem
		fi

		# If this isn't the last iteration, add newlines or paragraph HTML tags.
		if [[ "$count" -gt 1 ]];
		then
			text=$text'\n\n'
		fi

		# Decrement our counter variable.
		count=$(( $count - 1 ))
	done

	# Copy to clipboard!
	echo -e $text | pbcopy