Skip to content

Instantly share code, notes, and snippets.

View mul14's full-sized avatar
Preparing for big things...

Mulia Nasution mul14

Preparing for big things...
View GitHub Profile
mul14 /
Created January 18, 2022 10:33 — forked from rohsyl/
MariaDB switch to mysql_native_password

Switch to mysql_native_password plugin

By default MariaDB use the unix_socket plugin to authenticate users.

But it's easier to use mysql_native_password for dev (and only for dev because it's way less secure).

Get root access

sudo su
mul14 /
Created March 24, 2021 04:17 — forked from danbst/
[Linux] [Firefox] Open link in browser, which is in current workspace

I use separate Firefox profiles for work and personal stuff. To distinguish those I place them on different workspaces.

  • Workspace 0: firefox --no-remote -P MyJob
  • Workspace 1: firefox --no-remote -P default

I have also company Slack on Workspace 0. Which usually contains links to some work stuff.

The problem

mul14 /
Created November 21, 2020 07:02 — forked from ukn/
Install the kernal module required for the facetimehd camera to work on Linux
set -e
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
mul14 / DefaultKeyBinding.dict
Created August 4, 2019 00:31 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
mul14 /
Created October 26, 2018 00:35 — forked from ezekg/
iTerm key bindings

Open the iTerm preferences ⌘+, and navigate to the Profiles tab (the Keys tab can be used, but adding keybinding to your profile allows you to save your profile and sync it to multiple computers) and keys sub-tab and enter the following:

Delete all characters left of the cursor

⌘+←Delete Send Hex Codes:

  • 0x18 0x7f – Less compatible, doesn't work in node and won't work in zsh by default, see below to fix zsh (bash/irb/pry should be fine), performs desired functionality when it does work.
  • 0x15 – More compatible, but typical functionality is to delete the entire line rather than just the characters to the left of the cursor.

Delete all characters right of the cursor

⌘+fn+←Delete or ⌘+Delete→ Send Hex Codes:

  • 0x0b
mul14 / keyboardlayoutinfo.txt
Created May 17, 2018 10:04 — forked from mstange/keyboardlayoutinfo.txt
Keyboard layout info with in VS Code for "DVORAK-QWERTYCMD"
Layout info:
"id": "",
"lang": "en"
isUSStandard: false
| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |
| KeyA | a | A | | A | a | A | [KeyA] | |
mul14 / x_layout.keylayout
Created April 13, 2018 03:12 — forked from haosdent/x_layout.keylayout
Mac OS X Keyboard layout file, works in 10.11
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version on 2016-03-07 at 15:15 (SGT)-->
<keyboard group="126" id="-12870" maxout="1" name="x_layout">
<layout first="0" last="17" mapSet="16c" modifiers="f4"/>
<layout first="18" last="18" mapSet="984" modifiers="f4"/>
<layout first="21" last="23" mapSet="984" modifiers="f4"/>
<layout first="30" last="30" mapSet="984" modifiers="f4"/>
<layout first="194" last="194" mapSet="984" modifiers="f4"/>
mul14 /
Created April 7, 2018 14:06 — forked from metaphox/
Toolbox Construction

Rebuild Your OS X Toolbox: A Reminder

From Metaphox for Metaphox


  1. XCode
  2. xcode-select --install
  3. iTerm2
# Thanks to this post:
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O
$ cabextract PowerPointViewer.exe
$ cabextract
mul14 / 1-add-middleware.php
Created February 15, 2018 17:42 — forked from adamwathan/1-add-macros.php
Multiformat Endpoints in Laravel
namespace App\Http\Middleware;
class CaptureRequestExtension
public function handle($request, $next)
if ($request->route()->parameter('_extension') !== null) {
$request->attributes->set('_extension', substr($request->route()->parameter('_extension'), 1));