Skip to content

Instantly share code, notes, and snippets.

View lyndametref's full-sized avatar

Lynda Metref lyndametref

View GitHub Profile

Comment

  • Dont forgete the ; at the end of each call for multiple calls
  • Commands are case insensitive

Schema Commands

    CREATE TABLE TableName (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
        attr1Name VARCHAR(128), 
        attr2Name VARCHAR(128),
        OtherTableName_id INTEGER) # Foreign Key
@lyndametref
lyndametref / RegexCheatsheet.md
Last active September 5, 2016 08:28
Regex Cheatsheet

Anchors

^	Start of line or start of string
$	End of line or end of string
\A \Z Start/end of string
\b Word boundary
\B Not word boundary
\< \> Start/End of word

Characters types

. Matches any character except new line (\n)

@lyndametref
lyndametref / NodeJS.md
Last active July 28, 2016 08:34
NodeJS & co

Installing

sudo apt-get install -y nodejs

set the global install path

The global install put the files in ~/share/npm-global/

npm config set prefix ~/share/npm-global/

add exec path to PATH

add to .bashrc to add ~/share/npm-global/:

@lyndametref
lyndametref / Docker.md
Last active July 28, 2016 07:44
Docker commands

Start container dicsconnected from the shell

docker-compose up -d

Shell in running container

docker exec -it 6e796a466e53 bash

Stop and delete containers

@lyndametref
lyndametref / 1-PythonBasicsCheatCheet.md
Last active September 5, 2016 10:59
Pyhton3 cheatsheet

Data Types

Integer     -256, 15
Float       -253.23, 1.253e-10
String      "­Hello", 'Goodbye', """­Multiline­"""
Boolean     True, False
List        [ value, ... ]
Tuple       ( value, ... )
Dictionary  { key: value, ... }

Set { value, value, ... }

@lyndametref
lyndametref / add atom ppa
Last active July 7, 2016 12:59
atom hacking
sudo add-apt-repository ppa:webupd8team/atom