Skip to content

Instantly share code, notes, and snippets.

@fredjoseph
fredjoseph / WSL.md
Last active September 6, 2020 11:16
WSL

WSL

Terminal

  • wsltty: alternative to the default terminal allowing a simpler and more exhaustive configuration.

Quake mode

Requirements

  • AutoHotKey

Install

@fredjoseph
fredjoseph / _psql_utils
Last active May 31, 2020 10:17
psql/pgcli completion
#compdef pgcli psql pg_dump pg_dumpall pg_restore createdb dropdb vacuumdb createuser dropuser initdb
# ------------------------------------------------------------------------------
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users, Dominic Mitchell, Johann 'Myrkraverk' Oskarsson, Daniel Serodio, J Smith
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@fredjoseph
fredjoseph / .git_config
Created December 7, 2019 18:01
Git config with a huge list of aliases
[credential]
helper = store --file ~/.git-credentials
helper = cache --timeout 36000
[user]
name = Frederic JOSEPH
email = [email protected]
[stash]
usebuiltin = true
[alias]
a = add --all
@fredjoseph
fredjoseph / Git.md
Last active June 14, 2023 07:10
Git - miscellaneous

Install from source

    sudo apt update
    sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
    
    wget https://github.com/git/git/archive/<version>.zip -O git.zip
    unzip git.zip
    cd git-*
    
    make prefix=/usr/local all
@fredjoseph
fredjoseph / vim_cheatsheet.md
Last active September 29, 2020 07:15
Vim Cheat Sheet

Cheatsheet

Verbs

Key Signification
x Delete character under the cursor to the right
X Delete character under the cursor to the left
r Replace character under the cursor with another character
s Delete character under the cursor and enter the Insert mode
y yank (copy)
c change
@fredjoseph
fredjoseph / Windows10.md
Last active June 28, 2022 12:22
Windows 10 - Tips

Tips

God Mode

  • Create a folder named GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} on desktop

Show wifi passwords

  • Show all the saved profiles in your system
netsh wlan show profiles
  • Show Details about a specific WiFi Profile
@fredjoseph
fredjoseph / Debian.md
Last active April 16, 2021 15:06
Debian shortcuts

Shortcuts

Debian Desktop Shortcuts

Shortcut Utility
Ctrl+Alt+Delete Use this shortcut to logout of Debian.
Alt+Tab/ Super+Tab Use this shortcut to switch between open programs.
Ctrl+Alt+Tab Use this shortcut to switch between system controls such as Windows, Top Bar, and Desktop.
Ctrl+Alt +Esc Use this shortcut to directly switch between system controls.
Super+L Use this shortcut to lock the screen.
@fredjoseph
fredjoseph / launch.json
Created March 4, 2020 12:59
VSCode - Launch Debug
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch APP",
@fredjoseph
fredjoseph / Snap.md
Last active June 22, 2022 07:26
Snap App - CheatSheet
  • Search Snap app snap find vlc

  • Show App info snap info vlc

  • Install App sudo snap install vlc

  • List all apps

@fredjoseph
fredjoseph / VirtualBox.md
Last active May 5, 2022 13:44
VirtualBox - Tips and tricks

Tips

Mouse click lost after a while

The solution is to search and kill the processes named /usr/bin/VBoxClient --draganddrop

  • Search pgrep -a VBoxClient
  • Kill kill <pid> (or do both with tools like htop)

Shared clipboard lost after a while

The solution is to kill the current processes named /usr/bin/VBoxClient --clipboard and start a new one.

  • Search pgrep -a VBoxClient
  • Kill kill <pid> (or do both with tools like htop)