Skip to content

Instantly share code, notes, and snippets.

View njames's full-sized avatar

Nigel James njames

View GitHub Profile
@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 / base-reveal.js.html
Last active December 10, 2015 23:31
Base file for Reveal.js presentation using markdown
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Using reveal.js with external markdown</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="/js/reveal.js/css/reveal.css"/>
<style type="text/css">code{white-space: pre;}</style>
@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
@njames
njames / get_assignement_group.abap
Created August 14, 2019 05:02
example code for integrating into service now from fiori
method get_assignment_group.
data: uri type string
, group type ref to data
, group_row type ref to data
, group_name type string
, response type ref to if_rest_entity
.
* read the group name from config * hard coded from now