Skip to content

Instantly share code, notes, and snippets.

View termnml's full-sized avatar
📡

Felix Marx termnml

📡
View GitHub Profile
@jcppkkk
jcppkkk / OpenWithSublime.bat
Last active February 15, 2025 10:50 — forked from FoxColdMetal/OpenWithSublimeText.bat
[[[ Move to https://github.com/jcppkkk/OpenWithSublime !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"
@mildmojo
mildmojo / rotate_desktop.sh
Created June 18, 2014 06:47
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@sheldonh
sheldonh / .bashrc
Created April 15, 2015 09:38
bash git prompt on Fedora
if ! type __git_ps1 &> /dev/null && [ -e /usr/share/git-core/contrib/completion/git-prompt.sh ]; then
. /usr/share/git-core/contrib/completion/git-prompt.sh
fi
if type __git_ps1 &> /dev/null; then
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWCOLORHINTS=1
export PROMPT_DIRTRIM=2
export PROMPT_COMMAND='__git_ps1 "\w" "\\\$ "'
fi
@DavideMontersino
DavideMontersino / private-fork.md
Last active February 27, 2024 12:56
How to fork to a private gitlab instance

Theory:

your git repository can have more than one remote server; In this case we want to have two:

  1. one for our private repository on gitlab (will be the default one, called origin)
  2. one to be connected to the source repo on github, to be able to pull new changes (will be called upstream)

How to make a private fork from github to gitlab

@JamesTheBard
JamesTheBard / set_ntp_settings.yaml
Last active January 29, 2024 14:55
Configure NTP Client for `timedatectl` via `systemd-timesyncd`
# vim:ts=2:sts=2:sw=2:et
#===========================================================
# NTP Configuration Playbook
#===========================================================
# This script will remove the 'ntp' daemon from each server
# and properly configure the 'systemd-timesyncd' daemon so
# that 'timedatectl' uses a specific NTP server. Remember
# to create a 'timesyncd.conf' file that holds your config
# in the same directory as this ansible playbook before
# running.
@aziascreations
aziascreations / termux-url-opener
Last active January 11, 2021 05:21
Termux URL opener script with youtube downloader
#!/bin/bash
clear
bold=$(tput bold)
normal=$(tput sgr0)
if [[ $1 =~ ^.*youtu.*$ ]]; then
echo "${bold}Youtube-dl${normal}"
echo "> ${1}"
@rivo
rivo / postgres.go
Last active July 7, 2024 14:28
A demo Go application (a PostgreSQL database browser) highlighting the use of the rivo/tview package. See https://github.com/rivo/tview/wiki/Postgres
package main
import (
"database/sql"
"fmt"
"net/url"
"os"
"reflect"
"regexp"
"strconv"
@jdhao
jdhao / autocommands.vim
Last active July 29, 2022 17:18
My Neovim configurations for both terminal and gui (using nvim-qt). Repo: https://github.com/jdhao/nvim-config
"{ Auto commands
" Do not use smart case in command line mode,
" extracted from https://goo.gl/vCTYdK
augroup dynamic_smartcase
autocmd!
autocmd CmdLineEnter : set nosmartcase
autocmd CmdLineLeave : set smartcase
augroup END
" Set textwidth for text file types
@jdharmon
jdharmon / PSCommandCompletion.ps1
Last active November 28, 2023 21:07
PowerShell Kubectl & Helm Command Completion
# Setup
Install-Module -Name PSBashCompletions -Scope CurrentUser
$path = (mkdir (Join-Path (Split-Path -Parent $PROFILE) Completion)).FullName
((kubectl completion bash) -join "`n") | Set-Content -Encoding ASCII -NoNewline -Path $path/kubectl.sh
((helm completion bash) -join "`n") | Set-Content -Encoding ASCII -NoNewline -Path $path/helm.sh
# Profile
$completionPath = Join-Path (Split-Path -Parent $PROFILE) Completion
if (Test-Path $completionPath) {
Import-Module PSBashCompletions
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active April 12, 2025 07:27
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg