Skip to content

Instantly share code, notes, and snippets.

View bearcherian's full-sized avatar
🐻
here for the cookies 🍪

Bear Cherian bearcherian

🐻
here for the cookies 🍪
  • GitHub Staff
  • Dallas, TX
View GitHub Profile
#!/bin/sh
# list of users in the git repo sorted by their last commit.
git log --pretty=format:"%an" | sort | uniq | awk '{system("git log -1 --author="$1 " --pretty=format:\"%ad%x09%an\""); print "\n"}' | sort -k2M -k3n -k5n
@bearcherian
bearcherian / removeMergedBranches.sh
Created June 28, 2017 15:38
Delete all merged git branches locally and remote
#!/bin/sh
# Prunes merged branches except for master and develop
#
# Potential updates
# - use an array of branchs to skip/ignore
# - allow branches with a prefix ("release/...") to be skipped
MASTER="master"
DEVELOP="develop"
@bearcherian
bearcherian / organizeFiles.sh
Last active June 28, 2017 15:39
script to organize files by modified date
#!/bin/bash
# Organizes files based on their Modify date.
# folder structure is YYYY/MMDD/filename
FILE_ROOT=/path/to/files
FILES=$FILE_ROOT/*
for f in $FILES
do
# Skip if this is a directory or an executable (Assumes the script is in the same folder)
import std.stdio;
import std.regex;
import std.array;
import std.conv;
void main(string[] args)
{
if (args.length < 1)
{
writeln("No string specified");