Skip to content

Instantly share code, notes, and snippets.

View njames's full-sized avatar

Nigel James njames

View GitHub Profile
@njames
njames / Theme.md
Last active August 29, 2015 14:08
Themes thoughts for open ui5

icf handler class

/UI5/CL_THEME_DESIGNER_HANDLER

Theme link

@njames
njames / .bash_alias
Last active August 29, 2015 14:08
Alias for bash
source ~/.git-prompt-coloured.sh
alias vm="cd /var/www/laravel/Homestead/;vagrant up"
alias hs="cd /var/www/laravel/Homestead/;vagrant ssh"
alias xo="xdg-open $PWD"
alias copy="xclip -sel clip"
#alias cdv="DIR=/var/www/"$1";cd $DIR"
alias e="echo $1"
alias ..="cd .."
@njames
njames / .git-prompt-coloured.sh
Created November 4, 2014 11:06
prompt for git
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@njames
njames / git-aliases
Created January 14, 2015 04:02
some git aliases
.gitconfig aliases - works across all gits (gitbash / github posh / linux terminal)
[alias]
s = status
a = add
co = checkout
c = commit -a -m
b = branch
mt = mergetool
mg = merge
p = push
@njames
njames / oDataSearch.js
Created January 30, 2015 02:27
template for searching with custom search with odata and not a filter
oList.bindItems({path: listPath, parameters: { custom: { search: searchString }}, template: oTemplate });
// equivalent to passing ?search=searchString on the uri
@njames
njames / SAP GUI Favourites
Last active August 29, 2015 14:25
SAP GUI Favourites
0000100016 BC
0000100002 GW
0000100003 CRM
0000100009 PI
TR0000200007SEGW Gateway Service Builder
TR0000300015ZBP_SELECTOR
@njames
njames / forloops.js
Last active November 28, 2015 23:55
Favorite for loops
for (var i = 0, m = array.length; i < m; i++){ /// ... }
/// this pattern reduces the cost of counting the array or other object more than once
@njames
njames / ModelData.js
Created November 29, 2015 03:13
Get data from the Model for a event (sim for a control)
// get data from the Model for a event (sim for a control)
var path = oEvent.getSource().getBindingContextPath(),
data = this.getView().getModel().getProperty( path );
@njames
njames / handleError.js
Created November 29, 2015 06:44
function for handling odata error calls
function(oError) {
this.setBusy(false);
// var msg = $(oError.response.body).find('message').first().text();
try {
var msg = JSON.parse( oError.response.body).error.message.value;
msg = msg.split("|")[1];
} finally {
msg = "An error occurred on requesting access.";
}
jQuery.sap.require("sap.m.MessageBox");
@njames
njames / markdown.md
Created December 10, 2015 23:26
Example markdown file to use with Reveal.js showing horizontal and vertical transitions and builds and formatting with html comments

#Reveal.js Markdown starter (for 10)

Getting started with Reveal.js with an external markdown file


###Grocery List

  • Goat