Skip to content

Instantly share code, notes, and snippets.

View ibr's full-sized avatar
🎯

Konrad Riedel ibr

🎯
View GitHub Profile
@ibr
ibr / Set up GitHub push with SSH keys.md
Created September 12, 2022 06:34 — forked from xirixiz/Set up GitHub push with SSH keys.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
param (
[Parameter(Mandatory=$false)]
$logPath = "C:\Code\CreateUser.txt",
[Parameter(Mandatory=$false)]
$csvPath = "C:\Code\ExampleUsers.csv",
[Parameter(Mandatory=$false)]
$homeRoot = "\\$env:computerName\home",
[Parameter(Mandatory=$false)]
$usvRoot = "\\$env:computerName\usv",
[Parameter(Mandatory=$false)]
Function Write-Log
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True)]
[String]$LogFile,
[Parameter(Mandatory=$False)]
[switch]$HiddenLogFile,
@ibr
ibr / nice_trim.py
Created November 28, 2017 06:34 — forked from moloney/nice_trim.py
Throttled trimming
#! /usr/bin/env python
'''Run fstrim in chunks and sleep in between
'''
from __future__ import print_function, division
import os, sys, argparse, time, string, re, logging
from datetime import datetime
from random import random
from subprocess import check_output
@ibr
ibr / active_user
Created October 20, 2017 15:09 — forked from PhilHudson/active_user
Dual-screen interactive slideshow screensaver for MATE
#!/usr/bin/env bash
# Standard-repo requirements:
# w, awk, head, mktemp, split, grep, ck-list-sessions, sed, getent, cut
# TODO Check whether awk can't exit immediately after first match
ACTIVE_USER=`w --no-header -s | awk '/ :0 / {print $1}' | head -1`
[ -n "$ACTIVE_USER" ] && {
echo "$ACTIVE_USER"
exit 0
@ibr
ibr / .vimrc
Created October 8, 2013 19:52 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@ibr
ibr / mack.sh
Created May 13, 2011 07:13 — forked from djanowski/mack
mack() {
(($#)) || (echo "Usage: mack PATTERN PATTERN [PATTERN...]" && return 1)
if (($# == 1)); then
ack -l "$1"
else
grep -Ffx <(ack -l "$1") <(shift; mack "$@")
fi
}