Skip to content

Instantly share code, notes, and snippets.

@2called-chaos
2called-chaos / install_nginx_vim.sh
Created March 3, 2013 01:03
enable nginx vim syntax highlighting (on Ubuntu/Debian)
#!/bin/sh
mkdir -p ~/.vim/syntax/
cd ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394
mv download_script.php\?src_id\=19394 nginx.vim
cat > ~/.vim/filetype.vim <<EOF
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 2, 2024 09:06
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@olih
olih / jq-cheetsheet.md
Last active May 3, 2024 17:42
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@romainl
romainl / colorscheme-override.md
Last active April 27, 2024 15:36
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
@romainl
romainl / colorizenicks.vim
Created July 14, 2017 09:49
Colorize IRC nicks
hi u0 ctermbg=red
hi u1 ctermbg=yellow
hi u2 ctermbg=cyan
hi u3 ctermbg=darkgreen
hi u4 ctermbg=magenta
hi u5 ctermbg=darkred
let all_nicks = []
function! IsolateNicks(key, val)
@prologic
prologic / SelfHosted.md
Last active November 4, 2023 13:25
Self-hosted Golang apps by James Mills / prologic

Self-Hosted Go (Golang) Web Apps

  • golinks - golinks is a web app that allows you to create smart bookmarks, commands and aliases by pointing your web browser's default search engine at a running instance. Similar to bunny1 or yubnub. (Demo) MIT Go
  • notes - notes is a self-hosted note taking web app that lets you keep track of your notes and search them in a easy and minimal way. (Demo) MIT Go
  • pastebin - pastebin is a simple pastebin service with convenient CLI. (Demo) MIT Go
  • shorturl - shorturl is a simple URL shortener with very tiny URL(s). (Demo) MIT Go
  • todo - todo is a simple todo manager. (Demo) MIT Go
  • [wiki](https://git.mills.io/prolog
#!/usr/bin/env bash
# WARNING: vim caches ./configure results ALWAYS run "make distclean" AFTER each OPTION added or DEPENDENCY INSTALLED!
# --with-features=big is the least for +termguicolors 24bit truecolor support
# --with-features=huge is needed for profiling
# http://www.drchip.org/astronaut/vim/vimfeat.html
# debian dependencies
apt-get install -y gcc libncurses-dev build-essential make python3 libpython3-dev xorg-dev
@zats
zats / FindReplace.json
Last active November 26, 2023 17:59
Alternative spellings for some emojis according to /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/Resources/en.lproj/FindReplace.strings
{
"💍":"diamond | engagement ring | diamond ring | diamond rings | diamonds | engagement rings",
"🆎":"blood type AB",
"❣":"heart",
"🇱🇨":"Saint Lucia | Saint Lucian flag",
"🇮🇪":"Ireland | Irish flag",
"🇨🇮":"Côte d’Ivoire | Ivory Coast | Ivorian flag",
"💎":"diamond | gem | gemstone | jewel | diamonds | gems | gemstones | jewels",
"☠️":"skull and crossbones | poison | poisonous",
"👩‍💻":"technology worker | tech worker | technologist | techie | IT worker | Apple genius | woman in technology | woman tech worker | woman technologist | woman IT worker | woman in IT | woman Apple genius",
@fnky
fnky / ANSI.md
Last active May 3, 2024 17:31
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@romainl
romainl / showdeclaration.md
Last active January 22, 2023 14:54
Print declaration of word under the cursor

asciicast