This file contains 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
#!/bin/bash | |
#### Restart Bluetooth | |
if [ "$1" == "resetBT" ] ; then | |
sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth; | |
exit; | |
fi; | |
#### Toggle listen/speak | |
if [ "$1" == "" -o "$1" == "toggle" ] ; then |
This file contains 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
title Collab CI pipeline | |
space | |
==Commit verification job - project integration tests \n\nAlternative 2 - version metadata resolved by leveraging Maven.== #gold | |
entryspacing 0.4 | |
#actor Space for widening the source box............................... | |
actor Commiter | |
participant "Stash\n" as Stash #DodgerBlue |
This file contains 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
#!/bin/bash | |
REBASE_ONTO_BRANCH="develop" | |
REBASE_ONTO_REMOTE="upstream" | |
STARTING_COMMIT=$(git rev-parse HEAD) | |
STARTING_BRANCH=(git rev-parse --abbrev-ref HEAD) | |
GO_INTO_CONFLICT=""; | |
if [ "$1" == "force" ] ; then | |
GO_INTO_CONFLICT="true"; |
This file contains 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
function nonzero_return() { | |
RETVAL=$? | |
[ $RETVAL -ne 0 ] && echo "$RETVAL" | |
} | |
## Non-bold | |
#export PS1="\[\e[33m\]\A\[\e[m\] \[\e[32m\]\w\[\e[m\] \`nonzero_return\`\[\e[35m\]\\$\[\e[m\] " | |
## Bold | |
export PS1="\[\e[01;33m\]\A\[\e[m\] \[\e[01;32m\]\w\[\e[m\] \`nonzero_return\`\[\e[01;35m\]\\$\[\e[m\] " |
This file contains 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
@Path("/") | |
public class ResourceListingResource | |
{ | |
@GET | |
@Produces(MediaType.APPLICATION_JSON) | |
public Response showAll( @Context Application application, | |
@Context HttpServletRequest request) | |
{ | |
String basePath = request.getRequestURL().toString(); |
This file contains 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
/* Just Home and End | |
{ | |
"\UF729" = moveToBeginningOfLine:; // home | |
"\UF72B" = moveToEndOfLine:; // end | |
"$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home | |
"$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end | |
} | |
*/ | |
This file contains 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
set -e | |
TMP_DIR=`pwd`/tmp-data | |
TMP_REPO=`pwd`/jawabot | |
mkdir -p $TMP_DIR; | |
if [ ! -d $TMP_REPO ] ; then | |
mkdir -p $TMP_REPO; | |
cd $TMP_REPO; | |
git init; |
This file contains 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
alias.co checkout | |
alias.ci commit | |
alias.st status | |
alias.br branch | |
alias.hist log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short | |
alias.lg log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short | |
alias.type cat-file -t | |
## Checks the trailing whitespace and a \n before EOF |
This file contains 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
#!/bin/bash | |
## | |
## Run `ide.sh FooBar` and it most likely opens what you are looking for in the IDE: | |
## | |
## 1) Tries to open the path. | |
## 2) If it doesn't exist, it tries to open that file anywhere in the directory tree (provided it has some of the file name suffixes I currently use). | |
## 3) If not exists, it opens the files that contains a type of that name (class, function, interface). | |
## 4) If not found, it opens the files that contain given pattern. | |
## |
This file contains 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
/** | |
* Caches results returned from given fetcher callback for given key, | |
* up to maxItems results, deletes the oldest results when full (FIFO). | |
*/ | |
export class StaticCache | |
{ | |
static cachedData: Map<string, any> = new Map<string, any>(); | |
static maxItems: number = 400; | |
static get(key: string){ |