Skip to content

Instantly share code, notes, and snippets.

View YinHk's full-sized avatar
🏠
Working from home

Yin YinHk

🏠
Working from home
  • Canada
View GitHub Profile
@YinHk
YinHk / free-backend-hosting.md
Created September 17, 2022 05:28 — forked from bmaupin/free-backend-hosting.md
Free backend hosting
@YinHk
YinHk / mongodb cheatsheet.md
Created July 20, 2022 05:30 — forked from apolloclark/mongodb cheatsheet.md
mongodb cheatsheet
@YinHk
YinHk / dynamic-filter-table.html
Last active July 6, 2022 17:48
Dynamic filter table in using JavaScript
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
@YinHk
YinHk / postgres-cheatsheet.md
Created June 11, 2022 15:33 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class

Features and Step Definitions

Gherkin Keywords

  • Feature
  • Background
  • Scenario
  • Given
  • When
  • Then
  • And
@YinHk
YinHk / spring-boot-cheatsheet.java
Created January 7, 2022 09:34 — forked from jahe/spring-boot-cheatsheet.java
Spring Boot Cheatsheet
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@YinHk
YinHk / Commit Formatting.md
Created September 28, 2021 08:59 — forked from clemtibs/Commit Formatting.md
Angular Commit Format Reference Sheet

Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the Angular change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting