Skip to content

Instantly share code, notes, and snippets.

@netravnen
netravnen / multiple-git-remotes.gitconfig
Last active November 27, 2017 05:41
When doing 'git push origin' on current branch, will push branch to all specified remotes
[remote "gitlab"]
url = https://gitlab.com/username/repository-name.git
fetch = +refs/heads/*:refs/remotes/gitlab/*
[remote "github"]
url = https://github.com/username/repository-name.git
fetch = +refs/heads/*:refs/remotes/github/*
[remote "bitbucket"]
url = https://bitbucket.org/username/repository-name.git
fetch = +refs/heads/*:refs/remotes/bitbucket/*
[remote "origin"]

Keybase proof

I hereby claim:

  • I am netravnen on github.
  • I am chri (https://keybase.io/chri) on keybase.
  • I have a public key whose fingerprint is C8B3 82A8 A1CD CDB7 71FE B24C C654 948F DA86 BECD

To claim this, I am signing this object:

@netravnen
netravnen / Update-AUPackages.md
Last active July 5, 2018 21:57
Update-AUPackages Report #powershell #chocolatey
@netravnen
netravnen / move-browser-cache-to-ramdisk.bat
Last active October 21, 2019 22:33
Move Firefox/Chrome/Opera cache folder a ramdisk location (R:)
:: TITLE: move-browser-cache-to-ramdisk.bat
:: BY: GH:netravnen
:: NOTE: Requires administrator rights to run under Windows
:: VERSION: v1.0.0-20180728
:: Google Chrome
IF EXIST "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache" (
rmdir /S /Q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache"
mklink /D "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache" R:\cache
ECHO Google Chrome cache moved
@netravnen
netravnen / gen-ubuntu-sources-list.py
Last active August 7, 2018 09:29 — forked from JonasGroeger/gen-ubuntu-sources-list.py
Generates '/etc/apt/sources.list' compatible lists for Ubuntu releases
#!/usr/bin/env python3
import argparse
import getpass
import os
import time
import sys
import lsb_release
# Only LTS release codenames will be listed here - https://wiki.ubuntu.com/Releases
@netravnen
netravnen / win10_remove_store_apps.ps
Last active December 13, 2018 22:15
Windows 10: Remove default MS store apps
Get-AppxPackage *3dbuilder* | Remove-AppxPackage -AllUsers
Get-AppxPackage *windowsalarms* | Remove-AppxPackage -AllUsers
Get-AppxPackage *windowscalculator* | Remove-AppxPackage -AllUsers
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage -AllUsers
Get-AppxPackage *windowscamera* | Remove-AppxPackage -AllUsers
Get-AppxPackage *officehub* | Remove-AppxPackage -AllUsers
Get-AppxPackage *skypeapp* | Remove-AppxPackage -AllUsers
Get-AppxPackage *getstarted* | Remove-AppxPackage -AllUsers
Get-AppxPackage *zunemusic* | Remove-AppxPackage -AllUsers
Get-AppxPackage *windowsmaps* | Remove-AppxPackage -AllUsers
@netravnen
netravnen / rslsync-ufw.sh
Last active January 29, 2024 11:59 — forked from auipga/rslsync-ufw.sh
Help configuring ufw for Resilio Sync (rslsync)
#!/bin/bash
# Author: https://gist.github.com/auipga/
# Based on:
# Sync (outdated?): https://kb-archive.getsync.com/kbs/1.3.5/kb/hc/en-us/articles/210153106-Ports-and-protocols-used-by-Resilio-Connect.html
# Resilio Connect: https://help.getsync.com/hc/en-us/articles/204754759-What-ports-and-protocols-are-used-by-Sync-
# todo: read sync.conf from resilio server, parse json, fill IPs dynamically
# todo: delete duplicate rules as 'host' returns multiple IPs for resilios domains
@netravnen
netravnen / ntp.conf
Last active August 16, 2019 05:07
NTP
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
broadcastdelay 0.008
# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
#!/bin/bash
read -s -p "$(date --utc +'%FT%T.%3NZ'): Enter Password: " SSH_KEY_PASSWORD
#OPTS="-q -C ${SSH_COMMENT} -P ${SSH_KEY_PASSWORD}"
OPTS="-q -N ${SSH_KEY_PASSWORD}"
SSH_DIR="$HOME/.ssh" ; if [ ! -d $SSH_DIR ] ; then mkdir -p $SSH_DIR ; chown -R $USER:$USER $SSH_DIR ; chmod -R 700 $SSH_DIR ; fi
SSH_FILE_PREFIX='id_'