Skip to content

Instantly share code, notes, and snippets.

View Long18's full-sized avatar
:octocat:
// TODO: Add status

Thành Long (WiIIiam) Long18

:octocat:
// TODO: Add status
View GitHub Profile
.editor-group-watermark {
max-width: 500px !important;
padding-left: 1em;
padding-right: 1em;
}
.editor-group-watermark>.letterpress {
background-image: url("https://raw.githubusercontent.com/SAWARATSUKI/ServiceLogos/main/404Notfound/NotFound.png") !important;
aspect-ratio: 8/5 !important;
}
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "planck/rev6_drop",
"keymap": "planck_rev6_drop_planck_rev6_drop_layout_ortho_4x12_william",
"layout": "LAYOUT_ortho_4x12",
"layers": [
[
"KC_TAB",

Clear Browser Cache Script

This script allows you to clear the browser cache using JavaScript.

javascript:(function(){
  'caches' in window && caches.keys().then(cacheNames => cacheNames.forEach(cacheName => caches.delete(cacheName)));
  localStorage.clear();
  sessionStorage.clear();
 indexedDB.databases().then(databases =&gt; databases.forEach(db =&gt; indexedDB.deleteDatabase(db.name))).catch(error =&gt; console.error('Failed to clear IndexedDB:', error));
@Long18
Long18 / .gitconfig
Last active March 15, 2024 03:09
The error: "fatal: unable to create thread: Resource temporarily unavailable" when you using git in command line without ssh. In my case:
# Set the window memory size for Git's pack operation to 100 MB
git config --global pack.windowMemory "100m"
# Set the maximum size limit for a pack file in Git to 100 MB
git config --global pack.packSizeLimit "100m"
# Limit the number of threads Git will use for packing operations to 1
git config --global pack.threads "1"
@Long18
Long18 / BuildAddressablesEditorWindow.cs
Created January 23, 2024 04:13
The BuildAddressablesEditorWindow class streamlines Unity Addressable Assets building in the Editor, providing a shortcut (Alt+ B) under "Tools." It automates asset cleanup, initiates the build, and logs success/errors, enhancing the efficiency of the Addressable Assets build process.
public class BuildAddressablesEditorWindow: EditorWindow
{
[MenuItem("Tools/BuildAddressable &b")]
public static void BuildAndRun()
{
var window = GetWindow<BuildAddressablesEditorWindow>();
window.Close();
}
private void OnEnable()
{"version":1,"resource":"file:///c%3A/Users/long.le/Desktop/Project/github-action-test/.github/workflows/clean-manually.yml","entries":[{"id":"u6lL.yml","source":"renamed.source","timestamp":1710153308295},{"id":"HmP6.yml","timestamp":1710153333685}]}