Skip to content

Instantly share code, notes, and snippets.

View rkitover's full-sized avatar

Rafael Kitover rkitover

  • San Francisco, CA, United States
View GitHub Profile
@rkitover
rkitover / discord-hide-channel-bar.css
Created January 11, 2022 17:31
userstyle to auto-hide Discord channel bar
div[class^="sidebar-"] { width: 25px; transition: width 0.7s; }
div[class^="sidebar-"]:hover { width: 240px; }
@rkitover
rkitover / README.md
Last active August 1, 2022 22:26
My theme for posh-git PowerShell prompt.
@rkitover
rkitover / distro_normalizer.sh
Last active January 4, 2022 18:15
Linux Distribution Name Shortener/Abbreviator
#!/bin/sh
set -e
(while read -r distro; do
normalized=$(echo "$distro" | sed -E '
# Remove all buzzwords and extraneous words.
s/(GNU|Secure|open)//ig
@rkitover
rkitover / load-visual-studio-environment.sh
Last active May 9, 2024 20:08
Load Visual Studio environment in MSYS2.
# Visual Studio Environemnt Loader
#
# For MSYS2/Cygwin/etc..
#
# Set the following in your ~/.bashrc:
#
# ENVIRONMENT CONFIGURATION:
#
# To enable static linking where possible:
#
@rkitover
rkitover / head_tail.ps1
Created January 1, 2022 15:05
head/tail in PowerShell
function head_tail([scriptblock]$cmd, $arglist) {
$lines =
if ($arglist.length -and $arglist[0] -match '^-(.+)') {
$null,$arglist = $arglist
$matches[1]
}
else { 10 }
if (!$arglist.length) {
$input | &$cmd $lines
@rkitover
rkitover / status.txt
Created December 23, 2021 02:18
Chocolatey Packages Test Results
Nothing here yet.
@rkitover
rkitover / nanosetup.ps1
Last active January 12, 2022 23:11
PowerShell installer script for nano with syntax highlighting on Windows
$erroractionpreference = 'stop'
$releases = 'https://files.lhmouse.com/nano-win/'
ri -r -fo ~/Downloads/nano-installer -ea ignore
mkdir ~/Downloads/nano-installer | out-null
pushd ~/Downloads/nano-installer
curl -sLO ($releases + (
iwr -usebasicparsing $releases | % links |
? href -match '\.7z$' | select -last 1 | % href
@rkitover
rkitover / status.txt
Created December 21, 2021 20:57
Chocolatey Packages Update Status
Nothing here yet.
@rkitover
rkitover / profile.ps1
Created December 16, 2021 02:45
Make PowerShell help command nicer.
$PSDefaultParameterValues = @{"help:Full"=$true}
$env:PAGER = 'less'
@rkitover
rkitover / domain.conf
Last active June 14, 2022 03:28
nginx fancyindex dark mode override css
server {
listen 443 ssl http2;
server_name nightly.vba-m.com;
ssl_certificate /etc/certbot/live/nightly.vba-m.com/fullchain.pem;
ssl_certificate_key /etc/certbot/live/nightly.vba-m.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
ssl_prefer_server_ciphers on;