Skip to content

Instantly share code, notes, and snippets.

View cheeze2000's full-sized avatar
😋

cheeze2000 cheeze2000

😋
View GitHub Profile
@cheeze2000
cheeze2000 / keybindings.json
Last active March 7, 2024 16:21
VSCode Keyboard Shortcuts
[
{
"key": "ctrl+h",
"command": "-editor.action.startFindReplaceAction"
},
{
"key": "ctrl+h",
"command": "workbench.view.explorer",
"when": "editorFocus"
},
@cheeze2000
cheeze2000 / settings.json
Last active June 8, 2024 03:58
VSCode Settings
{
"breadcrumbs.enabled": false,
"editor.autoClosingBrackets": "never",
"editor.autoClosingDelete": "never",
"editor.autoClosingOvertype": "never",
"editor.autoClosingQuotes": "never",
"editor.cursorBlinking": "solid",
"editor.fontFamily": "Inconsolata Nerd Font",
"editor.fontSize": 17,
"editor.insertSpaces": false,
@cheeze2000
cheeze2000 / .tmux.conf.sh
Last active October 6, 2022 15:06
tmux config script
# Battery
battery_bg=''
battery_icon=''
battery_p="$(cat /sys/class/power_supply/BAT*/capacity)"
battery_c="$(cat /sys/class/power_supply/BAT*/status)"
if [ $battery_p -ge 60 ]; then
battery_bg="$green"
elif [ $battery_p -ge 40 ]; then
@cheeze2000
cheeze2000 / .tmux.conf
Last active October 6, 2022 15:07
tmux config file
set -g mouse on
set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
setw -g status-right-length 120
black='#282c34'
white='#abb2bf'
purple='#c678dd'
green='#98c379'
orange='#d19a66'
@cheeze2000
cheeze2000 / caravel.md
Last active January 1, 2023 10:09
Laravel + Caddy

PHP 8.1, Laravel 9.x, Caddy 2.x

Assume your Laravel project is in /home/cheeze/my-app/, make sure www-data has access to ./storage and ./bootstrap/cache/ with:

  • sudo chown -R www-data:www-data storage
  • sudo chown -R www-data:www-data bootstrap/cache

This is because Caddy needs write access to the logs inside these folders.

If you want to host this laravel app on https://laravel.example.com,

@cheeze2000
cheeze2000 / vim.md
Last active December 21, 2023 12:43
My Vim Cheat Sheet

This cheat sheet is very opinionated and it summarises keymaps that I find important and useful. These keymaps are default keymaps which means they work out of the box with Vim as well as Vim extensions on other editors.

This cheat sheet also contains examples where I would showcase how I use these keymaps.

Key Bindings

Note: C-a denotes Ctrl + a and {...} denotes a parameter. Although my key bindings don't really use Ctrl a lot, I still recommend mapping Ctrl to a convenient key, such as Caps Lock.

Prelude

To exit from Insert mode, do C-[. \

@cheeze2000
cheeze2000 / .eslintrc.js
Last active July 18, 2021 08:14
eslintrc
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
],