Skip to content

Instantly share code, notes, and snippets.

View datmt's full-sized avatar
🎯
Building the next usable thing

Mạnh Đạt datmt

🎯
Building the next usable thing
View GitHub Profile
@datmt
datmt / gist:d3d2774b7054e689614007400a80ba69
Created April 10, 2023 02:27
Git shorthand for linux/mac
alias sc="git branch --show-current"
alias c="git commit "
alias s="git status"
alias f="git fetch"
alias l="git log"
alias rl="git reflog"
alias a="git add"
alias d="git diff"
alias pl="git pull"
alias psh="git push"
@datmt
datmt / vimrc
Last active December 1, 2022 04:42
My Vim RC
set nocompatible
syntax on
filetype plugin indent on
set number
set ruler
set encoding=utf-8
set wrap
set tabstop=2
set shiftwidth=2
set softtabstop=2
# Debian 10, buster
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
@datmt
datmt / run.ahk
Last active July 1, 2022 07:21
Autohotkey script to start program on hotkey pressed
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2
!c::
@datmt
datmt / gist:d9050f7c3ad466957c17959c2d2dda82
Created June 11, 2018 11:22
WordPress Plugins Development Snippets
add_action('admin_menu', 'function_to_add_menu');
function core37_lp_form_add_menu()
{
add_menu_page('Page title', 'Page title', 'edit_posts', 'page-slug', 'function_to_display_ui');
}