Skip to content

Instantly share code, notes, and snippets.

View jicking's full-sized avatar
🤠

Jicking Bebiro jicking

🤠
View GitHub Profile
@jicking
jicking / gitTag.md
Last active November 13, 2024 16:46
GIT Tag

GIT Tag

Create a version tag (annotated) for a release

  • go to vscode, view git history
  • pick a commit, add release tag (version)
  • push tag to remote
  • Create a New Github Release, use created tag, let github generate release notes

Delete a version tag (annotated)

  • go to vscode, view git history
@jicking
jicking / PURGE_SOFTDELETES.sql
Created October 4, 2024 22:15
POSTGRESQL PURGE SOFTDELETES
-- PURGE SOFTDELETE : USERS
BEGIN; -- Start the transaction
DELETE FROM "Users" WHERE "DeletedDate" is not null;
SELECT COUNT("Id") FROM "Users" WHERE "DeletedDate" is not null;
ROLLBACK; -- Roolback the transaction
@jicking
jicking / godot-notes.md
Created September 19, 2024 05:52
godot-notes.md

godot-notes

  • https://learnxinyminutes.com/docs/gdscript/ GDScript is a dynamically and statically typed scripting language for the free and open source game engine Godot. Its syntax is vaguely similar to Python’s. Its main advantages are ease of use and tight integration with the engine. It’s a perfect fit for game development.

  • https://miniscript.org/MiniMicro/index.html#about Specifications 960 x 640 full-color (32-bit) display pixel, sprite, and tile graphics 68 x 26 text display

@jicking
jicking / semantic-commit-messages.md
Last active September 5, 2024 07:44 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer. Format: <type>(<scope>): <subject> <scope> is optional

Example

feat: add hat wobble
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=2GB
# Sets the VM to use two virtual processors
processors=2
@jicking
jicking / WINDOWS NVM SHARE TO OTHER ACCOUNT.md
Last active September 14, 2024 10:21
WINDOWS NVM SHARE TO OTHER ACCOUNT

WINDOWS NVM SHARE TO OTHER ACCOUNT

  • install NVM into main account
  • set directory to 'c:/nvm' instead of /user/roaming/
  • add this to System Variables > Path 'C:\nvm\nvm'
  • switch to 2nd account, add these on User Variables > Path NVM_HOME=C:\nvm\nvm NVM_SYMLINK=C:\Program Files\nodejs
  • restart machine, login to 2nd account and open terminal and run nvm, should work now
@jicking
jicking / ImageMagickResizeImageDemo.cs
Created October 10, 2023 00:13
ImageMagick resize image
using ImageMagick;
using (MagickImage image = new MagickImage(@"C:\Users\j\Desktop\raw.jpg"))
{
image.Format = image.Format; // Get or Set the format of the image.
image.Resize(100, 100); // fit the image into the requested width and height.
image.Quality = 40; // This is the Compression level.
image.Write("resized.jpg");
}
@jicking
jicking / .gitconfig
Created July 6, 2023 01:57
.gitconfig
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[user]
name = jicking
email = 7297029+jicking@users.noreply.github.com
[core]
autocrlf = input
@jicking
jicking / AuthPanel.test.tsx
Created June 3, 2023 03:32
React test mocking DEMO
/* eslint-disable testing-library/prefer-screen-queries */
import { fireEvent, render } from "@testing-library/react";
import { AuthPanel } from "./AuthPanel";
import React from "react";
// Mock the useAuth hook
const useAuthMockReturnValue = { isAuthenticated: false, toogleAuthHanlder: jest.fn() };
const useAuthMock = jest.fn().mockReturnValue(useAuthMockReturnValue);
// jest.mock is hoisted above import when used at top level and hoisted to the the
@jicking
jicking / ReactReducerFormExample.tsx
Created May 11, 2023 04:46
React Reducer Form Example
import { useReducer } from 'react';
interface State {
firstName: string;
lastName: string;
password: string;
repeatPassword: string;
email: string;
}