Skip to content

Instantly share code, notes, and snippets.

View LoneExile's full-sized avatar
🎯
Focusing

Apinant.u LoneExile

🎯
Focusing
View GitHub Profile
@nikolovlazar
nikolovlazar / keybindings.json
Last active November 11, 2024 08:37
VSCode key bindings to navigate like Neovim
[
// Navigation
{
"key": "ctrl-h",
"command": "workbench.action.navigateLeft"
},
{
"key": "ctrl-l",
"command": "workbench.action.navigateRight"
},
@ryanpback
ryanpback / autoload-nvm
Last active August 20, 2022 20:15
NVM Autoload
# This is how I've managed to make this work with the least amount of lag time.
# load-nvm from NVM checks the node version every time you cd into another directory which causes noticeable delays.
# This version will get your current working directory and traverse each directory looking for a `.nvmrc` file until it reaches your current directory.
# Once it finds the closest directory with a `.nvmrc` file, it will store that version in a variable `$NVM_VERSION_TO_USE`.
# Next is to hook into the preexec hook. If the command you're running starts with yarn, npm, or node (could maybe check others as well - any command that would invoke node),
# it will then set the node version using NVM.
# Running a yarn command has its own delay (install, test, start, etc.) so the small lag before the yarn command is negligable.
# It will also only set the node version once so long as you haven't switched directories, so subsequent invoking of yarn is quick.
@neno-tech
neno-tech / code1.gs
Created August 14, 2021 06:03
สร้าง API จาก GOOGLE SHEET และสร้าง API สำหรับเพิ่มข้อมูลลงใน GOOGLE SHEET
var ss = SpreadsheetApp.openById('xxx')
var sheet = ss.getSheetByName('xxx')
function doGet(e) {
var action = e.parameter.action
if (action == 'getUsers') {
return getUsers(e)
}
}
@vietdien2005
vietdien2005 / connect.sh
Last active June 21, 2022 00:03
Script Auto Reconnect OpenVPN
#!/bin/bash
read -p "Type name config file vpn: " name_file
function getStatus () {
ifconfig | grep $1 && return 1
return 0
}
while [[ 1 ]]; do
@ascendbruce
ascendbruce / README.md
Last active November 15, 2024 07:19
Use macOS-style shortcuts in Windows

Use macOS-style shortcuts in Windows / keyboard mappings using a Mac keyboard on Windows

ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows

Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)

With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.

How does it work

@seven1m
seven1m / init.vim
Last active July 24, 2024 07:22
my vim/neovim config in < 100 LOC
syntax on " enable syntax highlighting
set background=dark " we like it dark!
try | colorscheme gruvbox | catch | endtry " use this awesome theme if possible
highlight Pmenu ctermbg=black guibg=black | " fix popup color so it's easier to read
filetype plugin on " load plugins based on file type
filetype indent on " load indent settings based on file type
set shiftwidth=2 " number of spaces to use for indenting
set softtabstop=2 " number of spaces to use when inserting a tab
set tabstop=2 " show tabs as 2 spaces
set expandtab " convert tabs into spaces
@cferdinandi
cferdinandi / terminal-cheat-sheet.txt
Last active November 6, 2024 09:24
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@lowstz
lowstz / auto-ovpn.sh
Created February 8, 2012 15:22 — forked from xream/MacVPN.sh
Linux openvpn auto reconnect script
#!/bin/bash
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
### Thanks Xream's Work XD
# if you don't have several vpn servers to select, you can comment following line
# and use your openvpn config file name to replace "${host}.ovpn" in while loop.
read -p "Select the host: " host