Skip to content

Instantly share code, notes, and snippets.

View fdelacruz's full-sized avatar

Francisco De La Cruz fdelacruz

View GitHub Profile
@mengwangk
mengwangk / lsp_config.lua
Created August 1, 2021 15:20
LSP Config for Code Lens
local alt_key_mappings = {
{"code_lens", "n", "<leader>lcld","<Cmd>lua vim.lsp.codelens.refresh()<CR>"},
{"code_lens", "n", "<leader>lclr", "<Cmd>lua vim.lsp.codelens.run()<CR>"}
}
local function set_lsp_config(client, bufnr)
require"lsp_signature".on_attach({
bind = true,
handler_opts = {border = "single"}
})
@CdTCzech
CdTCzech / rust-install.cmd
Last active June 29, 2022 10:36
Install rust and rust-analyzer (requires git, rustup and npm)
REM Uninstall toolchains
rustup toolchain uninstall stable
rustup toolchain uninstall beta
rustup toolchain uninstall nightly
REM Set nightly as default and install default profile with rust-src
rustup set profile default
rustup toolchain install nightly
rustup default nightly
rustup component add rust-src
@bradtraversy
bradtraversy / docker-help.md
Last active November 23, 2025 10:14
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@ctubbsii
ctubbsii / etc_NetworkManager_conf.d_90-disable-randomization.conf
Last active July 24, 2025 21:51
NetworkManager configuration to disable WiFi MAC address randomization while scanning
# Place file in
# /etc/NetworkManager/conf.d/90-disable-randomization.conf
[device-mac-randomization]
# "yes" is the default for scanning in Fedora 25
wifi.scan-rand-mac-address=no
[connection-mac-randomization]
ethernet.cloned-mac-address=random
wifi.cloned-mac-address=random
Written by Thanos Apostolou
http://askubuntu.com/questions/53822/how-do-you-run-ubuntu-server-with-a-gui
Some more info can be found here https://help.ubuntu.com/community/ServerGUI. I assume you start with a clean install of Ubuntu Server 16.04 (some modifications may be needed for older versions of Ubuntu). Depending on your needs you can do these:
Minimal GUI:
sudo apt install xorg
sudo apt install --no-install-recommends openbox
Run the command startx and openbox will start (you can open a terminal there and run any application you want)
@t-mart
t-mart / netrw quick reference.md
Last active October 17, 2025 21:15
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
@alyssaq
alyssaq / 1. Install python3.7 & pip3.md
Last active April 11, 2023 02:13
Python3.7 setup on Mac 10.14 (Mojave)
  1. Install Python 3.7.x from https://www.python.org/downloads/ or via homebrew.
$ brew install python3   # Installed at /usr/local/Cellar/python3

Check that python3 has been installed by running it at the terminal:

$ python3
>>> Python 3.7.2
  1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):
@joepie91
joepie91 / vpn.md
Last active December 1, 2025 16:28
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@noahfrederick
noahfrederick / jsbeautify.vim
Created April 10, 2015 13:10
Vim NYC Meetup - 04/2015
" jsbeautify.vim - Wrapper for js-beautify command-line utility
"
" See js-beautify -h for available options.
if !executable('js-beautify')
finish
endif
function! s:JsBeautify() range abort
if &filetype ==# 'javascript' || &filetype ==# 'json'