Skip to content

Instantly share code, notes, and snippets.

View samiron's full-sized avatar
🏠
Working from home

Samiron paul samiron

🏠
Working from home
View GitHub Profile
#!/bin/bash
set -e
while true; do
log="$HOME/.npm/_logs/`ls $HOME/.npm/_logs/ | tail -n 1`"
echo "log: $log"
for path in `cat "$log" | grep 'ENOTEMPTY' | grep -oE "[^']+node_modules[^']+"`; do
echo "removing $path"
rm -rf "$path"
done
@samiron
samiron / .zshrc
Last active May 12, 2023 19:59
.zshrc files
source ~/.zshrc.java
source ~/.zshrc.git
@samiron
samiron / release-items.sh
Last active August 24, 2022 12:42
find jira items since the last tag
#!/bin/sh
# Usage:
# ./release-items.sh last-release-tag jira_number_prefix [-v]
jira_prefix=$1
since_tag=$2
if [ -z "$3" ]; then
lines=$(git log --oneline --first-parent "$since_tag"..HEAD | cut -d ' ' -f 5- | sed -nE "s/.*((:?${jira_prefix})\-[0-9]{3,6}).*/\1/p")
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: my-app-batch
namespace: appns
spec:
volumes:
- name: all-configs
configMap:
name: my-app-batch-config
@samiron
samiron / AnotherClass.java
Last active July 22, 2020 15:59
Function Relaying Using Java 8
something else
@samiron
samiron / .bashrc.spaul
Last active November 15, 2017 07:14
Personal bashrc file contains general utility. Will grow over time.
alias gs="git status"
function gds(){
git diff --color=always --staged "$@" | less -rS
}
function gd(){
git diff --color=always "$@" | less -rS
}
@samiron
samiron / catering_management.js
Created March 30, 2017 04:16
Google App scripts
var MAP = {}
function lunchCost(costs, orders) {
costs = ensureInputIsArray(costs);
orders = ensureInputIsArray(orders);
costsize = costs.length;
ordersize = orders.length;
@samiron
samiron / .vimrc.spaul
Last active March 24, 2017 12:50
My personal bare bone vimrc file
set nu
set autoindent
set winheight=999
set bg=dark
set ts=4
set shiftwidth=4
set expandtab
" make searches case-insensitive, unless they contain upper-case letters:
set ignorecase