Skip to content

Instantly share code, notes, and snippets.

View Speedy37's full-sized avatar

Vincent Rouillé Speedy37

View GitHub Profile
@Speedy37
Speedy37 / TortoiseSVN+P4Merge.md
Created September 8, 2022 10:17
TortoiseSVN+P4Merge.md

Diff

C:\Program Files\Perforce\p4merge.exe -nl %bname -nr %yname %base %mine

Merge

C:\Program Files\Perforce\p4merge.exe -nb %bname -nl %tname -nr %yname -nm %mname %base %theirs %mine %merged
@Speedy37
Speedy37 / userChrome.css
Last active June 2, 2021 08:54
[Proton] button to tabs, sound icon, menu padding
/** Add small space at the top */
.tab-stack {
margin-top: 4px;
}
/** Make tabs looks like tabs not buttons */
/* attach tabs to the toolbar */
.tab-background {
margin: 0px !important;
border-bottom-left-radius: 0 !important;
@Speedy37
Speedy37 / gpg-agent-relay.sh
Created July 10, 2020 11:02
WSL2 gpg agent relay (Yubikey)
#!/bin/bash
# Launches socat+npiperelay to relay the gpg-agent socket file for use in WSL
# See https://justyn.io/blog/using-a-yubikey-for-gpg-in-windows-10-wsl-windows-subsystem-for-linux/ for details
GPGDIR="${HOME}/.gnupg"
USERNAME=Vincent
# I use the same username for wsl and windows, but feel free to modify the paths below if that isn't the case
WIN_GPGDIR="C:/Users/${USERNAME}/AppData/Roaming/gnupg"
NPIPERELAY="${HOME}/npiperelay.exe"
@Speedy37
Speedy37 / git-commit-diff.md
Created July 10, 2020 08:52
List Different Commits Between Two Branches

This lists commits with the first line of their messages.

It also includes either a < or > arrow at the front of each commit indicating whether the commit is on:

  • <: left (feature)
  • >: right (master)
git log --left-right --graph --cherry-pick --oneline feature...master
@Speedy37
Speedy37 / sshd.sh
Created July 8, 2020 16:43
WSL2 sshd + netsh v4tov4
IP=$(ip -f inet -br addr show eth0 | awk '{match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/); ip = substr($0,RSTART,RLENGT>
ARGS="interface portproxy add v4tov4 listenport=2222 listenaddress=192.168.1.0 connectport=2222 connectaddress=$IP"
powershell.exe -Command "Start-Process netsh.exe -ArgumentList \"$ARGS\" -Verb RunAs"
sudo /etc/init.d/ssh start
@Speedy37
Speedy37 / bash.bashrc
Last active July 10, 2020 10:59
bash.bashrc
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# we have colors :-)
PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]:(\[\033[01;34m\] \")\\$\[\033[00m\] "
# Use this other PS1 string if you want \W for root and \w for all other users:
# PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h\[\033[01;34m\] \W'; else echo '\[\033[01;32m\]\u@\h\[\033[01;34m\] \w'; fi) \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]:(\[\033[01;34m\] \")\\$\[\033[00m\] "
alias ls="ls --color=auto"
alias dir="dir --color=auto"