CodingHome
CodingHome is a coding and web development community where tech enthusiasts of all skill levels can come together.
Disclaimer
We do not take responsibility for any damage or legal issues with these files here at AT Products LLC, and the other communities at the Ethical Hacking Society, The Script Community, CodingHome, or the Noodle Hackerspace.
Use a virtual machine if it's a computer virus; never open it on your physical machine. As a precaution, download them on your VM.
If it's an APK file, use an emulator.
More information on Virtual Machines (VM)
More information on APK Emulators
Resources
Please note that if a link is a warning link, the resource is not in the primary language here of English and is instead German.
Learning Resources
W3Schools
TutorialsTeacher
StackExchange
StackOverflow
ChatGPT
CodeAcademy
FreeCodeCamp
DevDocs
Leetcode
Imposter Devs
GoalKicker Programming Books
EDX Courses
Programming Quiz
progle()
Roadmaps for Languages
Organizing Code
Build your own X
System Design Primer
Book of Secret Knowledge
Project Based Learning
Digital Ocean - Community Resources
Microsoft's Documentation
Learn System Design
WikiBooks
Learning PHP The Right Way
CanIUse?
Refactoring Guru
Source Making
Cursor AI - Software Devs are Cooked
Tushar's Learning Blog
OpenDir (Resource Cloud)
Isometric Project in Games
RFC Editor
How to do Secret Key Exchange
Series and Parallel Circuits
Architectural Patterns
Software Planning and Technical Documentation
Python Resources
W3Schools Python Resources
Problem Solving with Algorithms and Data Structures using Python
Signal handling: Catch Ctrl-C in Python
__new__ vs __init__ in Python
Python Custom Exceptions
The Ultimate Guide to Python Decorators, Part I: Function Registration
Port Scanning Tool w/ Python
40 Python Libraries Explained
Nuitka Extractor
IDAPython Plugin
C# Resources
C# / dotnetDocumentation
C# Corner
C# Corner - Tutorials
C# TutorialsTeacher
C# Compiler Playground
ConfigurationManager C#
Making Production Ready C# Applications
Async I/O in C#
Making IDs safer in C#
Testing Tests (C#)
Mutational Testing
C# Hashing with Salt and Pepper
There are outdated files on the source, if you need to, use the updated files of the first code block and the second code block.
Inversion of Control Series
Introduction
Inversion of Control
IoC with Dependency Inversion Principle
Dependency Injection
IoC container
Dependency Injection for AvaloniaUI
SourcesMammaMiaDev - YouTube - Explains some possibilities.
MammaMiaDev - GitHub - Example repository for DI in context with Views & ViewModels | Showing App.xaml.cs
REQUIRED: Implement the RegisterViewFactory
from ViewLocator.cs
. It can be used for other stuff except Views & ViewModels.
Setup for Rider
Pre-conditions: Add package source (image1).
Instructions
Source Values:
- Name: Windows Community Toolkit Labs (or decide as you want)
- URL: https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json | REQUIRED
- User: Rider account name
- Password: Rider account password
Background Information
By this action you are modifying the NetGet.config file, which applies configurations to the NuGet package manager on your local machine.
Afterwards install the package from Rider's NuGet Window as usual and you're off to the races.
Other GitHub Repos
Official Instructions on adding the Community Toolkit as a NuGet packages source - Instructions are derived from this.
Create an AOT-friendly ViewLocator - MammaMiaDev is derived from this.
.NET Resources
C# / dotnetDocumentation
DotNet Tutorials
Download .NET
Download .NET Framework
JSON.NET
SSH.NET
.NET SQL Connecter Documentation
How to Handle Exceptions from Background Worker Thread in .NET
Unit of Work Pattern
UoW Pattern + Repo Docs
Clean Project Architecture
PDF Guide
Template 1
Template 2
Template 3
StackOverflow w/ NLog
Explanation Video
Tutorials EU - C# Solution Strucure
.NET Architecture: How To Structure Your Solutions - Design
Redit - Proper project strucure
David Fowl's Gist
Nick Chapsas - How to structure a .NET Solution (project separation & architecture)
Installing .NET 8.0 SDK on Ubuntu Server 24.04 LTS
wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg
Create a file ->
/etc/apt/sources.list.d/microsoft.sources
Paste content (JavaScript):
Types: deb
URIs: https://packages.microsoft.com/ubuntu/22.04/prod/
Suites: jammy
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/microsoft.gpg
Then (Console):
sudo apt update
Fixing libicu dependency package issue
Package is at this date & time not available for Ubuntu 24.04 LTS. Paste content (Console):
echo "deb http://archive.ubuntu.com/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/libicu-jammy.list
Pinning to lower priority to avoid conflicts with with main 24.04 repositories. Paste content (Console):
sudo tee /etc/apt/preferences.d/libicu <<EOF
Package: libicu*
Pin: release n=jammy
Pin-Priority: 100
EOF
Update system & install .NET SDK. Paste content (Console):
sudo apt update && sudo apt install dotnet-sdk-8.0
Rust Resources
Web Resources
Webflow University MDN Web Docs
JavaScript Resources
Mozilla JS Tutorials
Modern JavaScript Tutorial JS Regex Cheatsheet
TypeScript Resources
Lua Resources
Markdown Resources
Other Language Resources
Game Dev Resources
Visual Library
Free Assets
Using AI to Generate Game Assets For Free
Painterly Animations in Blender 3D
Bing AI on: What has to be on a model design sheet, so I can work with it in Blender?
Godot Resources
Godot Docs
Godot UI Setup
Godot Toolbox
Godot Materials
The full "stack" of components in a 3D project can be visualized as:
- Model/Mesh: Structure of the object.
- Material/Shader/Texture: How the object looks and interacts with light.
- Rig/Animation: How the object moves.
- Scene/Light/Camera: How the object is viewed and interacts in the environment.
- Physics/Collider: How the object interacts physically with other objects.
- Scripts/Assets/Particles/Sound: Control behaviors, effects, and environmental immersion.
Godot Scenes
Mohsen Zare - MTerrain
Mohsen Zare - Terrain Approach
Jen Jell - OWG
Wandering Clipmap with LOD
Terrain3D
Wojtek - Forest Scene
Linux Resources
How to Install FTP Server on Ubuntu with vsftpd
How to install and manage supervisor on Ubuntu and Debian VPS
Linux Kernel Module Programming Guide
How to Fit In with Linux Users
Arch Resources
Pacman Tips and Tricks (Arch)
Arch Linux Clean Instructions
Astonishing GNOME customization
Glassmorphism
Everforest
Fluent
Orchis GTK
Evergreen
Apache, MariaDB and PHP (LAMP) Installation for Arch-based Distros
[HowTo] Install Apache, MariaDB (MySQL), PHP (LAMP)
> PS: You must add a
phpmyadmin
DB and import/usr/share/webapps/phpmyadmin/sql/create_tables.sql
there - on Linux.
> And also modify / add some lines in your.../phpmyadmin/config.inc.php
to tellphpmyadmin
to use this DB for it's configuration storage:
Under the phpMyAdmin configuration storage settings
-section
Un-comment all tables matching the pattern below - but check in your DB, if they were created by the create_table.sql
.
// REQUIRED User - uncomment as well!!!
// Replace 'pma' and 'pmapass' with the username & password of a MySQL user that contains the appropriate privileges on the phpmyadmin database.
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
// Pattern
$cfg['Servers'][$i]['tableName'] = 'tableName';
Optional: Create the User
CREATE USER 'pma'@'localhost' IDENTIFIED BY'pmapass';
GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost';
FLUSH PRIVILEGES;
Problems or using Windows?
=> Refer to the Docs: http://yourServerNameOrIPAddr/phpmyadmin/doc/html/setup.html#phpmyadmin-configuration-storage
Mega.nz Resources
Udemy Mega.nz 12 Parts Courses Collection
4 TB Mega.nz Courses Collection
14 TB Mega.nz Courses Collection
Additional CyberSecurity Files
150 Interview Problems (AlgoExpert Course 1)
Systems Design Fundamentals (AlgoExpert Course 2)
Data Structures Crash Course (AlgoExpert Course 3)
Become an Algorithms Expert (AlgoExpert Course 4)
Interview Preparation Course (Part 1) (AlgoExpert Course 5)
Interview Preparation Course (Part 2) (AlgoExpert Course 6)
Interview Tips (AlgoExpert Course 7)
Code With Mosh (Code: p9nGMhSXETZBAEYGoKty8Q)
All Guides VenenJean used to Install VisualBox under Manjaro
Guide 1 (Manjaro Wiki)
Guide 2 (Hibbard)
Guide 3 (CherryServers)
Guide 4 (IBM)
Guide 5 (LinuxIAC)
Guide 6 (MariaDB)
SSH Public Key Connection Setup
Manjaro Wiki
Other Resources
Data Management Blog
Report Phishing
CodeBeautify
SonarLint
FreeSoff (Free Software)
Math, Science, Tech, Culture, and Life API
Free AI Writing, PDF, Image, and Other Online Tools
Open Source Alternatives
Free Letter Forms
NirSoft
Commontools.org
CS2DLL
Eraser (Planning)
ChatGPT-API-Server
Chrome Render to Terminal
Don't ask to ask, just ask
StackOverflow Yearly Surveys
State of Language Survey
Web Resources
WHOIS Lookup
Web Security Testing
CSS Data URI
URL Decoder
Lorem Ipsum Generator
Astro
Bootstrap
Tailwind.css
JQuery JS
Vanilla-JS Framework
Bulma CSS Framework
Internet Tools
Netlify
Vercel
Webby Awards
PageSpeed Insights
Webby Awards
No Code Browser Automation The Secret Science of Perfect Spacing Part 1 The Secret Science of Perfect Spacing Part 2
YouTube Creators
This section will not be categorized by accordions.
C#
JavaScript
General
Clean Coders
Coderized
Winderton
CodeAesthetic
Studying with Alex
Fireship
Computer Science
CS50 | Harvard University
Loi Liang Yang
Web Development
Kevin Powell Web Dev Simplified
The Website Architect
Javascript Mastery - YT
Javascript Mastery - Website
Networks/Cybersecurity
Indie App Development
NeoVim Usage
Hacking Resources
Making the Hacker Mindset
Hacking The Cloud
HackTricks
Trickest
HackTheBox
CTF Hacking for Beginners
LiveOverflow
Malapi
Unprotect Project
0DayFans
MOOC Courses
Cheat.sh Repos
Windows API Function Naming Convention
File Path Race Condition & How To Prevent It - bin 0x31 (LiveOverflow)
InSeCam
Open Redirector/SSRF Payload Generator
CPU/IP Table
CyberHack 2023
List of UNIX Binaries for Priv Escalation
Linux & Bash Hacking
CyberChef
Hacking Stats
PasteBin
Hijack URLS
Developing CyberSecurity Solutions
Attacking Ad
Power Supplies to Speakers
AirGap
FCC ID Database
Sploitus
r/netsec
OSINT start.me 1
OSINT start.me 2
How Secure is 256-bit Security?
TailOS Setup
Hijacking account with Open Redirect in OAuth 2.0 - Stealing Access Tokens
Discovering API and Analyzing Endpoints Using Postman and Browser w/ crAPI
Exploiting SQL Injection in GraphQL
Learn before CyberSecurity
Tips before CyberSecurity
Graphql Endpoint Analysis
WireShark Videos
Win10 VM Rat
Analyzing Data 1
Analyzing Data 2
Analyzing Data 3
Network Fundamentals
Obfuscating Programs
Process Hardening
Debug Off
GoldBerg
Cryptify
Mem Encrytion
Stronghold-Runtime
Hela
CTF/RE Resources & Challenges
CherryTree Template for CTF Enumeration
CTF Compact Guide
CTF Events
CTF Learning 1
CTF Learning 2
CTF Challenges
Reverse Engineering
RE Challenges
RE BreachDirectory
pwnable.tr
Challenge 1
Challenge 2
Challenge 3
Challenge 4
Challenge 5
Challenge 6
Challenge 7
Challenge 8
Challenge 9
Challenge 10
Challenge 11
Challenge 12
Challenge 13
Challenge 14
GitHub Resources
CyberSecurity Programming Language
Cloud In A Box (CIAB)
Impulse (DoS Toolkit)
Data Stealer
AntiDebug, AntiVM, AntiAV C Linux Library
Vulnerable Module Detector
Web Fuzzer (Go)
OSCP Training
OSCP/PTP/PTX Cheatsheet
Voice Cloning
CTF Cheatsheet
Pentest Guide
KeyHacks
TomNomNom
Payloading
pyWhat
TempestSDR
GodGenesis
OSINTeye
Suborner
FBI Tools
Aggressor Scripts 1
Aggressor Scripts 2
Aggressor Scripts 3
Aggressor Scripts 4
Aggressor Scripts 5
Aggressor Scripts 6
Aggressor Scripts 7
CobaltStrike Toolset for Aggressor Scripts
CICDont
CICDont Capture the Flag
Superma
SpiderSuite
Portex Analyzer GUI
Almond Force Videos
BCACTF 3
HeroCTF v4
Incognito 3
MidnightFlag - INFEKTION
Hacky Holidays 2022
Hack the Boo 2022
CTF After Dark - Fall 2022
Digital Overdose 2022 Autumn CTF
DEADFACE CTF 2022
HTB Business CTF
Tenable CTF 2022
TyphoonCon CTF 2022 (KeyGenMe)
Cyber Apocalypse 2022 (HackTheBox)
Hack The Box - Starting Point (Tier 0): Fawn
Hack The Box - Starting Point (Tier 0): Meow & Almond Force Channel Updates
HackTheBox Marshal in the Middle
11 HackTheBox Videos
TJCTF 2022
BYU CTF 2022
Digital Overdose CTF 2022
NahamCon CTF 2022
Boilers CTF 2022
PatriotCTF 2022
TAMUctf 2022
picoCTF 2022
Metared CTF 2022 Stage 1
Metared CTF 2022 Stage 2
Metared CTF 2022 Stage 3
Metared CTF 2022 Stage 4
Blackhat MEA CTF 2022
WRECKCTF2022
DownUnderCTF 2022
CSAW CTF 2022
Inter-Galactic CTF 2022
SHELL CTF 2022
Whack-a-frog corCTF 2022
T3N4CI0US CTF 2022
TFC CTF 2022
MITRE Cyber Academy CTF 2022
picoCTF 2023
Cyber Apocalypse 2023
CTFGuide to CyberChef
Are Certs Worth It?
Downloadable Resources
Windows Kernel Programming
ViewPractical IoT Accessing
ViewBlack Hat w/ Python
ViewDoD for CyberSecurity
ViewRace Conditions for Web Pentesting
ViewDigital Systems (10th Edition PDF)
Clean Architecture: Structuring your Applications for Minimal Effort & Maximal Result.
ViewFree coding books!
ViewFree Coding Handbooks!
View1,000 I.T books!
ViewOver 8M+ eBooks!
ViewViruses & Malware
Meme_Coin (ZIP) Meme_Coin (EXE) My_App (ZIP) Myballzhert (ZIP) by Dream3456789 (Password: "mysubsarethebest")
Trojan_Spyer (EXE) by MagSam2
Scam (ZIP) by the pfp is for nuking kpopserver
BFF_DoS (exe) Code (TXT) Baby (BAT) BabyCodes (TXT) by Corrupt Assassin
Code Samples
Insitux Compiler Chess I (Insitux) Chess II (Insitux) Ballstics I (Insitux) Math Libs for Insitux svelte-app Rosetta Code (Insitux) Polinomic Solver (Insitux) Ambiguous Operator (Insitux) Rock Paper Scissors (Insitux) by Al-Ford Arthur
Rock Paper Scissors (Python) by SezieruUMS-WF Principles for C# & Java by venenjean
IP3 by Patrick
ROTL by JSman225
ISS Obfuscator (Python 3.9) by vesper
Snake Game in One Line of Code (Python) by ByThon
ScammerPayback Tic Tac Toe (Python) Flask PayPal (Python | ZIP) Apache Stress Tester (Python) bestree (Python) SSL Protection (Python) SeedPhraseHack (Python | ZIP) Domain Checker (Python) Discord Mass DM (Python | ZIP)
IP Address Generator Checker (Python | ZIP)
Clash of Clans Wrapper (Python | ZIP)
Crunch Password Generator (Python | ZIP) Mint (OSINT) (Python | ZIP)
Webcam Search (Python | ZIP) Discord Token Onliner (Python | ZIP) boosint (OSINT) (Python | ZIP) ntru (Python | ZIP) pq-ntru (Python | ZIP) IP Address Generator Checker by CodingLive
ncrypt.c by Sezieru
This is a relatively simple example for usingcrypt()
on Linux to generate Linux-compatible password hashes. This is useful for replacing a lost password hash, for example. Other OSINT Guides
Use caution upon entering these links as they grab your personal information upon entering.
VanishGuide Discord Phishing Links IP Address List By CodingLive
Apps & Software
SMS Bomb (APK) (Site) by CodingLive
Veilo by CodingLive
Encochat by CodingLive
vpnchecker by CodingLive
Use caution upon entering these links as they grab your personal information upon entering.
Python Basics
Comments
You can write text that the program will ignore by beginning the line with a #, this helps with reminding you what certain code does or for explaining purposes.
# This is a comment
Data Types
Variables can store data of different types, and different types can do different things.
Python has the following data types built-in by default, in these categories:
Text Type: str
Numeric Types: int, float, complex
Sequence Types: list, tuple, range
Mapping Type: dict
Set Types: set, frozenset
Boolean Type: bool
Binary Types: bytes, bytearray, memoryview
We will go more in-depth on some of these types in the next few sections.
You can print the data type of a variable with the type()
function:
x = 5 print(type(x))
Strings
Strings are surrounded by either single quotation marks, or double quotation marks.:
x = "hello"
y = 'hello'
# single quotations and double quotation marks are the same
x == y # returns True
You can assign a multiline string to a variable by using three quotes:
x = """The FitnessGram Pacer test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter Pacer test will begin in 30 seconds."""
You can check the length of a string using the len() function:
x = "hello"
print(len(text)) # returns 5
Numbers
There are 2 primary, int
and float
x = 2 # int
y = 2.8 # float
To verify the type of an object in Python, use the type() function:
print(type(x))
print(type(y))
Int, or integers, are whole numbers, positive or negative, without decimals.
Float is a number, positive or negative, containing one or more decimals.
Both strings and numbers are built-in data types.
C++ Basics
Strings
A string is a sequence of characters representing text. Strings are typically enclosed in quotation marks and can be stored in variables for later use in a program.
#include <ostream>
#include <string>
int main() {
// Declare a string variable
std::string str = "codinghome";
}
Integers and Floating Point Numbers
Simply said, Integers are used for numbers without a decimal, and Float is used for numbers with decimals, simply said. There is more to that but we are keeping it simple.
#include <iostream>
int main() {
// Declare an integer variable
int num = 10;
// Declare a floating-point variable float
fnum = 10.5;
}
Printing an output to the terminal/console:
#include <iostream>
int main() {
// Declare an integer variable
int num = 10;
// Declare a floating-point variable
float fnum = 10.5;
std::cout << "num: " << num << std::endl; // <-- Prints the integer variable (variable num)
std::cout << "fnum: " << fnum << std::endl; // <-- Prints the floating point variable (variable fnum)
return 0;
}
Other Data Types
As previously listed:
string
- Integers (whole number) (2 or 4 bytes).int
- floating point number (4 bytes).float
- Stores strings (Text) (use ').But there are other data types in C++, such as:
double
- Stores strings (Text) (use ").char
- floating point number (8 bytes).bool
- true (1) or false (0) (1 byte).Haskell Basics
Data Types
In Haskell, types are how you describe the data your program will work with. Types can be simple, like:
- Bool: boolean True or False.
- Char: one character.
- Int: fixed-precision signed integer (usually 64-bit)
- Float / Double: floating-point values.
Or, they can be composed with constructs, like:
- String: shortcut for [Char].
- [a] : list of
a
s (where a is a general type). - (a, b) : tuple composed of
a
andb
- Just a : Maybe monad with the
Just
option
Function Type Declaration
Haskell's functions will usually have 2 parts: a type declaration, and the implementation of the function itself (the type part can also be inferred):
-- type declaration
-- constraints => type -> ... -> returnType (the last type will always be the return type)
countIns :: Eq a => a -> [a] -> Int
-- implementation
countIns x = length . filter (== x)
- Bool: boolean True or False.
- Char: one character.
- Int: fixed-precision signed integer (usually 64-bit)
- Float / Double: floating-point values.
Notice the type declaration has 2 types of "arrows": =>
and ->
.
- => : used for giving additional context of what rules
a
should follow (in the example above, we see a should be part of theEq
class, which allows for comparison) - -> : used for actually declaring the type of the function (in the above example, we see the first argument is
a
, a general, comparable type, then a list of as and then finally it outputs anInt
eger)
Function Definition
Functions are defined similar to:
functionName argument(s) = expression
Haskell forces declarative style, so functions are (usually) composed of just an expression (always returns a value).
-- type declaration
countIns :: Eq a => a -> [a] -> Int
-- implementation
-- function args = expression
countIns x = length . filter (== x)
Functional Principles
Haskell restricts to the functional paradigm, meaning Haskell enforces:
- Immutability: when the
data
has to be defined again for it to "change" - Purity: functions must be pure, producing no side-effects (like modifying a global variable), and must be deterministic (
f(x) = y
, no matter whenf
is called) - Higher-order functions: functions must be first-class, meaning they can be passed as arguments to other functions. This allows for higher-order functions. which take a function and other data and apply the function to the data in different ways.
- Disciplined state trying to minimize the use of mutable state and trying to make it local when possible.
Comments
In-line comments are made with --
and block comments with {- -}
:
-- inline
commentHere = False {
- block commentHere = True -}
HTML Basics
Example Document
<!DOCTYPE html>
<html>
<body>
<h1>My first Heading</h1>
<p>My first paragraph</p>
</body>
</html>
The <!DOCTYPE>
declaration represents the document type, and helps browsers to display web pages correctly. It must only appear once, at the top of the page (before any HTML tags). The <!DOCTYPE>
declaration is not case sensitive.
HTML Headings
HTML headings are defined with the <h1>
to <h6>
tags.
<h1>
defines the most important heading. <h6>
defines the least important heading:
<h1>Big</h1>
<h6>Small</h6>
HTML Paragraphs
HTML paragraphs are defined with the <p>
tag:
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
HTML Links
HTML links are defined with the <a> tag:
<a href="https://example.com">This is a link</a>
HTML Images
HTML images are defined with the <img> tag. The source file (src), alternative text (alt), width, and height are provided as attributes:
<img src="example.jpg" alt="example.com" width="104" height="142">
CSS Basics
Example Document
h1 {
color: black;
text-align: center;
font-size: 26px;
font-family: verdana;
}
<p style="font-size:10px">
To put CSS files in HTML, use:
<link rel="stylesheet" href="style.css">
To put CSS code in HTML, use:
<style>
.class {
color: red;
}
</style>
CSS Rulesets
Selector
p {
Property
color: red;
Declaration
}
Properties - With these, you can style a HTML element, like for example; color.
Property Value - This chooses one of the possible options for a given property, like red for color.
You can also write CSS like:
html{color:red;}
You can also put styles in HTML elements:
<h1 style="font-color:white;">
You can also select multiple elements with commas at once like...
h1, h4, h6, h2 {
color: red;
}
Classes
Think of classes like custom HTML elements, they can be applied in HTML:
<p class="text-red">
Classes begin with a dot or period (.) to begin the selector.
.text-red {
color: red;
}
Selectors
There are more ways to select elements and classes apart from their name. Here's some common ones:
:hover
- Applies the CSS rules if the element is selected.:first-child
- Selects the first child element if it is inside a parent element.:last-child
- Selects the last child element if it is inside a parent element.:nth-child(n)
- Selects elements based on position, replace n
with a number.:focus
- Selects elements if it is focused, usually by using the TAB
. :has(+ element)
- Selects the element if the selected element is before it.Text Elements
font-size: 10px;
- Text size, can be in pixels.font-family: verdana;
- Fontstext-align: center;
- Can align to the left side, right side, or in the center of the webpage. text-shadow: 3px black
- Shadow of text. It can be in pixels and colors.Padding Elements
padding-top: 50px;
- Separation. It can be top, left, right, and bottom in pixels.margin: 50px;
- A margin. It can be in pixels.border-width: 5px;
- Border width. Can be thin, medium, thick, or just pixels.border-style: dotted;
- Border style. Can be dotted, dashed, solid, double, groove, ridge, inset, outset, none, or hidden. Can also be colored.width=500px;
- Width of the element. It can be pixels or percentages.
Color Elements
color: red;
- The color of the element, can be hexadecimal, or RGB.background-color: white;
- Background color of the element.Comments
Comments are commonly used to explain the code and may help when you edit the source code later and are ignored by browsers.
A CSS comment starts with /*
and ends with */
, and no changes are needed to make it multiple lines.
/* This is a single-line comment */
/* This is
a multi-line
comment */
Extra: Centering Images
img {
margin: 0 auto;
display: block;
}
JavaScript Basics
Including JavaScript in an HTML Page
<script type="text/javascript">
//JS code goes here
</script>
Call an External JavaScript File
<script src="myscript.js"></script>
Including Comments
Single line comments - // Comment
Multi-line comments - /* comment here */
Variables
var, const, let
var
— The most common variable. It can be reassigned but only accessed within a function. Variables defined with var move to the top when code is executed.
const
— Can not be reassigned and not accessible before they appear within the code.
let
— Similar to const, however, let variable can be reassigned but not re-declared.
Data Types
Numbers —
var age = 23
Variables —
var x
Text (strings) —
var a = "init"
Operations —
var b = 1 + 2 + 3
True or false statements —
var c = true
Constant numbers —
const PI = 3.14
Objects —
var name = {firstName: "John", lastName: "Doe"}
Objects Example
var person = {
firstName: "John",
lastName: "Doe",
age: 20,
nationality: "American"
}
SQL Basics
Querying Data from a Table
Query Data in Columns c1, c2 from a Table
SELECT c1, c2 FROM t;
Query All Rows and Columns from a Table
SELECT * FROM t;
Query Data and Filter Rows with a Condition
SELECT c1, c2 FROM t
WHERE condition;
Query Distinct Rows from a Table
SELECT DISTINCT c1 FROM t
WHERE condition;
Sort the Result Set in Ascending or Descending Order
SELECT c1, c2 FROM t
ORDER BY c1 ASC [DESC];
Skip Offset of Rows and Return the Next n Rows
SELECT c1, c2 FROM t
ORDER BY c1
LIMIT n OFFSET offset;
Group Rows using an Aggregate Function
SELECT c1, aggregate(c2)
FROM t
GROUP BY c1;
Filter Groups using Having Clause
SELECT c1, aggregate(c2)
FROM t
GROUP BY c1
HAVING condition;
Modifying Data
Insert One Row into a Table
INSERT INTO t(column_list)
VALUES(value_list);
Insert Multiple Rows into a Table
INSERT INTO t(column_list)
VALUES (value_list),
(value_list), …;
Insert Rows from t2 into t1
INSERT INTO t1(column_list)
SELECT column_list
FROM t2;
Update New Value in the Column c1 for All Rows
UPDATE t
SET c1 = new_value;
Update Values in the Column c1, c2 that Match the Condition
UPDATE t
SET c1 = new_value,
c2 = new_value
WHERE condition;
Delete All Data in a Table
DELETE FROM t;
Delete Subset of Rows in a Table
DELETE FROM t
WHERE condition;
Table Management
Create a new Table with Three Columns
CREATE TABLE t (
id INT PRIMARY KEY,
name VARCHAR NOT NULL,
price INT DEFAULT 0
);
Delete the Table from the Database
DROP TABLE t ;
Add a new Column to the Table
ALTER TABLE t ADD column;
Drop Column c from the Table
ALTER TABLE t DROP COLUMN c ;
Add a Constraint
ALTER TABLE t ADD constraint;
Drop a Constraint
ALTER TABLE t DROP constraint;
Rename a Table from t1 to t2
ALTER TABLE t1 RENAME TO t2;
Rename Column c1 to c2
ALTER TABLE t1 RENAME c1 TO c2 ;
Remove all Data in a Table
TRUNCATE TABLE t;
JSON Basics
Example Document
{
"foo": "bar",
"array": [
"foo",
"bar"
]
}
All JSON files are surrounded by { and }, which means it is a object. Unlike Javascript, you must use double quotes (") for strings, not singular quotes (')
Importing JSON
JavaScript |
|
---|---|
Node.js |
|
TypeScript + Node.js |
|
Python |
|
Comments
Below is an example of comments.
// This is a single line comment /* * This is a multi-line comment * that spans multiple lines */