This file contains hidden or 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
# Reset the current branch to the commit just before the last 12: | |
git reset --hard HEAD~12 | |
# HEAD@{1} is where the branch was just before the previous command. | |
# This command sets the state of the index to be as it would just | |
# after a merge from that commit: | |
git merge --squash HEAD@{1} | |
# Commit those squashed changes. The commit message will be helpfully | |
# prepopulated with the commit messages of all the squashed commits: |
This file contains hidden or 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
# http://stackoverflow.com/questions/1463340/revert-multiple-git-commits | |
# A <-- B <-- C <-- D <-- master <-- HEA | |
git revert --no-commit D | |
git revert --no-commit C | |
git revert --no-commit B | |
git commit -m'the commit message' |
This file contains hidden or 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
Goal: To understand what this does: | |
mapChargesOverrides(iChargeOverrides).map(validateCharge).sequence[PartialApply1Of2[ValidationNEL, String]#Apply, Charge] | |
Lets look at the types leading up to the sequence operation: | |
mapChargesOverrides(iChargeOverrides) : Seq[Charge] | |
mapChargesOverrides(iChargeOverrides).map(validateCharge) : Seq[ValidationNEL[String, Charge]] | |
We can decompose using the type alias: | |
type ValidationNEL[E, X] = Validation[NonEmptyList[E], X] |
This file contains hidden or 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
def mergeMaps[A, B](map1: Map[A, Set[B]], map2: Map[A, Set[B]]): Map[A, Set[B]] = { | |
(map1.toSeq ++ map2.toSeq).groupBy(_._1).mapValues(_.map(_._2).toSet).mapValues(_.flatten) | |
} |
This file contains hidden or 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
Show hidden characters
[ | |
{ "keys": ["ctrl+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, | |
{ "keys": ["ctrl+d"], "command": "duplicate_line" } | |
] |
This file contains hidden or 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
object ActionType extends Enumeration { | |
type ActionType = Value | |
val GET = Value("Get") | |
val SET = Value("Set") | |
implicit def stringToActionType(action: String): ActionType = action match { | |
case "Get" => GET | |
case "Set" => SET | |
} | |
} |
This file contains hidden or 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
[ | |
{ "keys": ["super+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, | |
// { "keys": ["super+d"], "command": "duplicate_line" }, -- Default is super+shift+D | |
{ "keys": ["super+`"], "command": "toggle_side_bar" }, | |
{ "keys": ["super+shift+up"], "command": "swap_line_up" }, | |
{ "keys": ["super+shift+down"], "command": "swap_line_down" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} } | |
] |
This file contains hidden or 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
grep -o '.\{0,20\}test_pattern.\{0,20\}' – | |
portion on left is how many characters before match and portion on right is how many characters after match | |
using this to pull out unique RICS from a json string where they are suffixed by the text (RIC) | |
grep -o '.\{0,7\}(RIC).\{0,0\}' junitResult.xml | uniq | sort | cut -d " " -f 1 |
This file contains hidden or 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
" Use bash shell to run scripts (fish isn't POSIX compliant) | |
set shell=bash | |
" Vundle Config [Package Manager for Vim] - https://github.com/VundleVim/Vundle.vim | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
This file contains hidden or 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
*.class | |
*.log | |
# mine | |
.idea | |
build | |
target | |
logs | |
.gradle | |
data |
OlderNewer