Skip to content

Instantly share code, notes, and snippets.

@nickytonline
nickytonline / settings.jsonc
Created May 5, 2024 18:25
Latest VS Code Settings
{
// miscellaneous
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
"diffEditor.ignoreTrimWhitespace": false,
// window
"window.title": "🦙⚡🫡 – ${activeEditorShort}${separator}${rootName} – 🫡⚡🦙",
"window.clickThroughInactive": false,
@qoomon
qoomon / conventional_commit_messages.md
Last active May 6, 2024 18:40
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@tinsaeDev
tinsaeDev / example.js
Last active May 6, 2024 18:34
Ethiopian mobile phone number validation JavaScript regular expression ( Regexp )
function isEthiopianMobileNumber(telNumber){
return /^(0|251|\+251)(9|7)[0-9]{8}$/.test(telNumber)
}
@vasanthk
vasanthk / System Design.md
Last active May 6, 2024 18:32
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
@wojteklu
wojteklu / clean_code.md
Last active May 6, 2024 18:30
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@julianbonilla
julianbonilla / GsonTest.java
Created May 24, 2012 21:18
Read json from file into Gson
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import com.google.gson.Gson;
public class GsonTest {
public static void main(String[] args) throws FileNotFoundException {
@dabrahams
dabrahams / EfficientMutableProjection.swift
Last active May 6, 2024 18:30
How to efficiently create a mutable projection without inducing CoW
/// Returns `(source, transform(source.pointee))` and destroys `source.pointee`.
///
/// This is a low-level utility for creating mutable projections of values without
/// causing needless copy-on-write.
///
/// Typical usage:
///
/// func f(x: inout X) { // inout means we have exclusive access to `x`.
/// var (xAddress, xFrobnication)
/// = unsafeMoveMap(destroying: &x) { x.frobnication() }
# .gitignore for Unreal Engine projects with embedded Wwise projects
# This is a work in progress, please report any issues to Quin Henshaw
# Unreal
Binaries/
DerivedDataCache/
Intermediate/
Plugins/*/Intermediate/
Saved/
Build/
@gabe565
gabe565 / change-arc-icon.md
Last active May 6, 2024 18:25
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy