Skip to content

Instantly share code, notes, and snippets.

mysql> INSERT INTO school (name, country, capacity)
-> VALUES ('Beauxbatons Academy of Magic', 'France', 550),
-> ('Castelobruxo', 'Brazil', 380),
-> ('Durmstrang Institute', 'Norway', 570),
-> ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 450),
-> ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300),
-> ('Koldovstoretz', 'Russia', 125),('Koldovstoretz', 'Russia', 125),
-> ('Mahoutokoro School of Magic', 'Japan', 800),
-> ('Uagadou School of Magic', 'Uganda', 350);
Query OK, 9 rows affected (0.00 sec)
mysql> select * from wizard where birthday between '1975-01-01' and '1985-01-01';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 2 | hermione | granger | 1979-09-19 | | Friend of Harry Potter | 0 |
| 4 | ron | weasley | 1980-03-01 | | Best friend of Harry | 0 |
| 5 | ginny | weasley | 1981-08-11 | | Sister of Ron and girlfriend of Harry | 0 |
| 6 | fred | weasley | 1978-04-01 | | | 0 |
| 7 | george | weasley | 1978-04-01 | |
### GET wilder
GET https://http-practice.herokuapp.com/wilders
Accept: application/json
### GET wilder
GET https://http-practice.herokuapp.com/wilders?language=JavaScript&page=2
Accept: application/json
Tracing DNS delegation for "www.google.com":
Loading root server list (static data):
-> a.root-servers.net (198.41.0.4)
-> b.root-servers.net (192.228.79.201)
-> c.root-servers.net (192.33.4.12)
-> d.root-servers.net (128.8.10.90)
-> e.root-servers.net (192.203.230.10)
-> f.root-servers.net (192.5.5.241)
-> g.root-servers.net (192.112.36.4)
-> h.root-servers.net (128.63.2.53)
{
"simple Console Log": {
"prefix": "csl",
"body": ["console.log($1);"],
"description": "simple Console Log"
},
"forEach": {
"prefix": "forEach",
"body": [
2048 grep France,2019,PHP wilders.csv > php_france_2019.txt
2049 cat php_france_2019.txt
2050 grep 'JavaScript\|Biarrits\|Toulouse wilders.csv > javascript_biarritz_toulouse.txt
2051 ls
2052 grep 'JavaScript\|Biarrits\|Toulouse' wilders.csv > javascript_biarritz_toulouse.txt
2053 ls
2054 cat javascript_biarritz_toulouse.txt
2055 c
2056 rm javascript_biarritz_toulouse.txt
2057 grep -E 'JavaScript*Toulouse|JavaScript*Biarritz' wilders.csv > javascript_biarritz_toulouse.txt
#!/bin/sh
echo -n "entrez votre nom: "
read name
echo "Bien le bonjour $name"
const cowsay = require("cowsay");
console.log(
cowsay.say({
text: "hello boooooooys, viens boire mon laiiiiit",
e: "^^",
t: "u "
})
);
process.stdin.resume();
process.stdin.setEncoding("utf8");
console.log("How old are you ? ");
process.stdin.on("data", a => {
let age = parseInt(a);
if (age < 100 && age > 0) {
let yearOfBirth = 2019 - age;
console.log(`So you were born in ${yearOfBirth}`);
}
class person {
constructor(name, age) {
this.name = name;
this.age = age;
}
tellMyName() {
console.log(`I am ${this.name}`);
}