Skip to content

Instantly share code, notes, and snippets.

@Graham42
Graham42 / map-filter-reduce-example.groovy
Last active May 25, 2022 16:48
Groovy example for map, filter, reduce
// In Groovy
// collect = "map"
// inject = "reduce"
//
// See http://docs.groovy-lang.org/next/html/documentation/working-with-collections.html for docs
////////////////////////////////////////////////////////////////////////////////
// Arrays
def myNumbers = [3, 5, 1]
@aviskase
aviskase / Postman.desktop
Last active November 21, 2023 20:56
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/home/USERNAME/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@adeekshith
adeekshith / .git-commit-template.txt
Last active September 18, 2024 15:59 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active September 23, 2024 11:01
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@pR0Ps
pR0Ps / pre-receive
Last active August 29, 2015 14:09
Server-side commit message validation
#!/bin/sh
read oldrev newrev refname
NULL_SHA1="0000000000000000000000000000000000000000"
revs=""
case $oldrev,$newrev in
*,$NULL_SHA1) # Deleting ref
;;
@sidequestboy
sidequestboy / .bashrc
Last active March 24, 2020 18:44
coloured PS1 with git branch, stash indicators
#
# ~/.bashrc
#
export PATH="/usr/lib/colorgcc/bin/:$PATH:/home/jamie/.gem/ruby/2.1.0/bin"
export CCACHE_PATH="/usr/bin"
export WORKON_HOME=$HOME/.virtualenvs
source /usr/bin/virtualenvwrapper_lazy.sh
VBOX_USB=usbfs
# If not running interactively, don't do anything
@simonewebdesign
simonewebdesign / install_sublime_text.sh
Last active March 11, 2024 12:23
Install Sublime Text 3 on Linux via POSIX shell script - http://simonewebdesign.it/install-sublime-text-3-on-linux/
#!/bin/sh
# Sublime Text 3 Install (last update: Monday 13 March 2017)
#
# No need to download this script, just run it on your terminal:
#
# curl -L git.io/sublimetext | sh
# Detect the architecture
@borgand
borgand / git-merge-svn
Last active January 7, 2019 06:44
A helper script to set *svn:mergeinfo* property when using `git svn dcommit` on merged git branches.This makes it possible to merge two SVN branches using **git-svn**.NB! the merged-from branch **MUST** be pushed to SVN.USAGE: git merge-svn <branch name>EDIT: added exit condition when mergeinfo calculation fails to avoid pushing incomplete merge…
#!/bin/bash
function usage {
echo "USAGE: git merge-svn <from> [<to>]"
echo ""
echo " from The branch name to be merged FROM"
echo " to Optional branch name to be merged onto. Default: HEAD"
echo ""
}