Skip to content

Instantly share code, notes, and snippets.

@vuon9
vuon9 / README.md
Last active April 12, 2024 18:41
Powertoys - Keyboard Manager - Common macOS keys mapping

How to install

  • cd C:\Users\${username}\AppData\Local\Microsoft\PowerToys\Keyboard Manager
  • Backup file existing one of default.json
  • Download default.json and add it to the current folder

Mapped keys

key
Esc
@vuon9
vuon9 / php-cs-fixer-std.php
Last active January 26, 2024 00:10
Custom php-cs-fixer script to make it runnable with stdout
#!/usr/local/bin/php
<?php
// Inspired from https://gist.github.com/Epskampie/427c512722b8e6c4cbf5f1340b87986b
// To use this script:
// - Change #!/usr/local/bin/php to your PHP binary path
// - chmod +x php-cs-fixer-std.php
// - Make symlink: ln -s ~/Downloads/php-cs-fixer-std.php /usr/local/bin/php-cs-fixer-std
// - Use: php-cs-fixer-std fix --rules=@Symfony src/PhpFile.php
// - This supports only one file and --debug flag to see the file content before and after the fix
@vuon9
vuon9 / sqlboiler_example_mock.go
Last active December 12, 2023 09:27
Unit testing with SQLBoiler
package services
import (
"database/sql"
"reflect"
"regexp"
"testing"
"github.com/DATA-DOG/go-sqlmock"
"github.com/volatiletech/sqlboiler/boil"
)
@vuon9
vuon9 / privacy-policy-of-just-a-new-tab.md
Created November 18, 2023 21:07
Privacy Policy of Just a new tab - Chrome extension

Privacy Policy for Just a new tab

Privacy Policy Last updated: November 18, 2023

This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You.

We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the Free Privacy Policy Generator.

Interpretation and Definitions

  1. Install fish shell on Mac
    brew install fish
  2. Install oh-my-fish
    curl -L https://get.oh-my.fish | fish
    
  3. Install $PATH
  • From iterm2
@vuon9
vuon9 / README.md
Created August 18, 2023 03:18
Sequel Ace bundle - Copy as JSON (modified)

To not have "data" as root level but just pure array of data.

@vuon9
vuon9 / README.md
Last active July 27, 2023 05:42
Sequel Ace bundle - Copy as Cucumber table

Copy a bundle command to a new one then change it to similar like the below settings.

How the bundle setting looks like

This will help to copy via context menu:

image

@vuon9
vuon9 / gist:8a7a132dc66542950d4e150b90718401
Last active March 6, 2023 10:30
Easily confused glyphs
// Source: https://news.ycombinator.com/item?id=11718653
* b69B80Oo
* 1Il|
* ij
* 5S
* 9gq
* co
* rn m
* cl d
* vv w
@vuon9
vuon9 / windows-10-all-things.md
Last active November 23, 2022 06:34
Windows 10 all things

Windows 10 all things

To make it works like a charm, or just works nearly-like a Mac environment, or just an adaptive for a PC 10 years old, instead disable too much features as tweak registry keys, or some tips like Windows 7 optimization.

Tuning tips

@vuon9
vuon9 / README.md
Created February 20, 2022 12:33 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run: