This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo aptitude install meld; git config --global merge.tool meld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd; du -hd1 | sort -h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log -25 --no-merges --pretty=format:"%h - %an, %ar : %s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# JustWorks{4Me}Linux --- version 0.0.1a | |
# each section is prepped for copy and paste | |
# mount /arch (freshly formatted) | |
# set some ENVs | |
# find you mirror here: https://www.archlinux.org/mirrorlist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias steal_site='wget --mirror --convert-links --adjust-extension --page-requisites --no-parent' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#function for yo .bashrc/.zshrc | |
inotify_delay_cmd() { | |
while true; do | |
inotifywait -r -e create -e delete -e modify --exclude '^\./\..+' . | |
"$@" | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch to the master(or dev) branch and make sure you are up to date. | |
# Taken from http://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit | |
# =================================================================================================== | |
# ------ basically ggpull 1st; | |
git checkout dev | |
git fetch upstream # eller `git fetch origin` HVIS gatekeeper | |
git merge upstream/dev # eller `git pull` HVIS gatekeeper | |
# start here ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bonus: sexy logfile ;) | |
sudo su | |
printf "#\!/usr/bin/env sh\n(date;docker rmi \$(docker images -q);echo +++++;) \ | |
>> /var/log/docker_rmi_cron.log 2>&1\n" > /etc/cron.weekly/docker-rmi | |
chmod +x /etc/cron.weekly/docker-rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Make sure you have a PRIVATE_TOKEN in the file ~/.gitlab_token | |
GL_TOKEN=$(cat ~/.gitlab_token) | |
[ -z $GL_TOKEN ] && (printf "\n\nno token!\n\n\n";exit 1) | |
# USERID from username ARG1 on command-line | |
USER_NAME=${1:-kjetil.midtlie} | |
USERID=$(curl "https://gitlab.com/api/v4/users?private_token=$GL_TOKEN&username=$USER_NAME" | jq -r '.[0]|.id') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# improved some of guide: | |
# https://aws.amazon.com/premiumsupport/knowledge-center/troubleshoot-iam-permission-errors/ | |
usage() { | |
echo >&2 "Usage: $0 <[email protected]|user_id> [hours_back]" | |
exit 1 | |
} |
OlderNewer