Skip to content

Instantly share code, notes, and snippets.

@masih
masih / go-update-all-deps.sh
Created May 28, 2024 15:37
Update all go mod dependencies to latest
#!/bin/bash
set -e
go list -json -m all | jq -r 'select(.Indirect != true and .Main != true) | "\(.Path)@latest"' | while read -r pkg; do
go get "$pkg"
done
go mod tidy
@masih
masih / keybase.md
Last active December 5, 2020 11:28
keybase.md

Keybase proof

I hereby claim:

  • I am masih on github.
  • I am masiih (https://keybase.io/masiih) on keybase.
  • I have a public key ASCpO8NVqr4LoRPcL0vzkP_YYucLV_EE8LyHg4E3ZIaKdwo

To claim this, I am signing this object:

@masih
masih / xclip_local_install.sh
Last active January 2, 2024 10:57
Installs XClip locally
#!/bin/bash
# Script for installing xclip on systems without root access.
# xclip will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
XCLIP_VERSION=0.12
@masih
masih / tottf.sh
Created May 2, 2014 11:37
Converts any font to TTF using FontForge
#!/usr/local/bin/fontforge
# Quick and dirty hack: converts a font to truetype (.ttf)
# Usage:
# for i in *.XXX; do fontforge -script tottf.sh $i; done
Print("Opening "+$1);
Open($1);
Print("Saving "+$1:r+".ttf");
Generate($1:r+".ttf");
Quit(0);
@masih
masih / fish_shell_local_install.sh
Last active November 15, 2024 03:54
Installs Fish Shell without root access
#!/bin/bash
# Script for installing Fish Shell on systems without root access.
# Fish Shell will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
FISH_SHELL_VERSION=2.1.1
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
#!/bin/sh
M2_REPO=${HOME}/.m2
OLDFILES=/tmp/deleted_artifacts.txt
AGE=195
echo "==== To be Deleted Jars ====" >> ${OLDFILES}
find "${M2_REPO}" -path '*SNAPSHOT*' -name '*jar' -type f -atime +${AGE} >> ${OLDFILES}
echo "==== To be Deleted Wars/Ears ====" >> ${OLDFILES}