This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Simple Console Log": { | |
"prefix": "csl", | |
"body": "console.log($1);", | |
"description": "Simple Console Log" | |
}, | |
"Array methods": { | |
"prefix": "arrmtd", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 ls | |
23 cat people | |
24 grep "Lubomir Frank" people | grep "Pape Kantarci" | grep "Alberto Pedersen" | grep "Joe Germuska" | grep "Marharyta Willmott" | grep "Jeremy Bowers" | grep "Darae Charlos" | grep "Jacqui Maher" people | |
25 grep "Lubomir Frank" people | grep "Pape Kantarci" | grep "Alberto Pedersen" | grep "Joe Germuska" | grep "Marharyta Willmott" | grep "Jeremy Bowers" | grep "Darae Charlos" | grep "Jacqui Maher" people > suspect3 | |
26 ls | |
27 cat suspect3 | |
28 rm suspect3 | |
29 ls | |
30 cat membership | |
31 cat memberships |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/emilybremond/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hello(name:string) { | |
console.log("Hello " + name); | |
} | |
var firstName:string = "bob"; | |
hello(firstName); | |
hello(firstName + " marley"); | |
function concat(a:string, b:string) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person{ | |
name:string; | |
age:number; | |
constructor(name: string, age: number){ | |
this.name = name; | |
this.age = age; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
console.log('How old are you ?') | |
process.stdin.on('data', (number) => { | |
if (isNaN(number)){ | |
console.log ("type a number please") | |
} | |
else{ | |
if(number<99 && number>0){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as assert from 'assert'; | |
class BankCustomer{ | |
private name:string; | |
private pinInput: string; | |
constructor(name:string, pinInput:string){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cowsay = require("cowsay"); | |
console.log(cowsay.say({ | |
text : "Hello boy", | |
e : "oO", | |
T : "U " | |
})); | |
// or cowsay.think() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> USE wild_db_quest; | |
Reading table information for completion of table and column names | |
You can turn off this feature to get a quicker startup with -A | |
Database changed | |
mysql> SELECT firstname,lastname,birthday,birth_place,biography,is_muggle FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1985-12-31'; | |
+-----------+----------+------------+-------------+---------------------------------------+-----------+ | |
| firstname | lastname | birthday | birth_place | biography | is_muggle | | |
+-----------+----------+------------+-------------+---------------------------------------+-----------+ | |
| harry | potter | 1980-07-31 | london | | 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SELECT * FROM school; | |
Empty set (0,00 sec) | |
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), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic', 'Uganda', 350); | |
Query OK, 8 rows affected (0,02 sec) | |
Records: 8 Duplicates: 0 Warnings: 0 | |
mysql> SELECT * FROM school; +----+----------------------------------------------+----------+----------------+ | |
| id | name | capacity | country | | |
+----+----------------------------------------------+----------+----------------+ |