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
var orientation = getOrientation(), | |
newOrientation; | |
Titanium.Gesture.addEventListener('orientationchange', function(e){ | |
if (e.orientation == Titanium.UI.PORTRAIT || e.orientation == Titanium.UI.UPSIDE_PORTRAIT){ | |
newOrientation = 'portrait'; | |
}else if(e.orientation == Titanium.UI.LANDSCAPE_LEFT || e.orientation == Titanium.UI.LANDSCAPE_RIGHT){ | |
newOrientation = 'landscape'; | |
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
// create table view data object | |
var data = [ | |
{title:'Row 1'}, | |
{title:'Row 2'}, | |
{title:'Row 3'}, | |
{title:'Row 4'}, | |
{title:'Row 5'}, | |
{title:'Row 6'}, | |
{title:'Row 7'}, | |
{title:'Row 8'}, |
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
# grunt-init gruntplugin | |
# npm install | |
# grunt | |
module.js:340 | |
throw err; | |
^ | |
Error: Cannot find module 'minimatch' | |
at Function.Module._resolveFilename (module.js:338:15) |
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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
// Example SCSS file | |
$primaryColor: #eeffcc; | |
$container-width: 100%; | |
// consume variables |
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
POST /restapi/users/storedcv/save/ HTTP/1.1 | |
Host: researchjobfinder-webservice.madgexjb.com | |
Content-Type: multipart/form-data; boundary=----myRandomBoundary12345 | |
Accept: */* | |
Connection: keep-alive | |
Content-Length: 53383 | |
User-Agent: MadgexReleaseApp/com.madgex.researchjobs (4002100135; OS Version 10.0.1 (Build 14A403)) | |
Accept-Language: en-GB;q=1.0,da-GB;q=0.9 | |
Authorization: OAuth oauth_token="b55a0b37-d813-4815-823d-58562266adcf", oauth_nonce="5403445C-A10D-40CF-8895-07661B32C4AA", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="1CA260F7-2FCC-4116-8C3E-F79B89BF8906", oauth_timestamp="1474382335", oauth_version="1.0", oauth_signature="eSyL3rCduYf0pblaTzZxcWkBYso%3D" | |
Accept-Encoding: gzip, deflate |
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
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
<head> | |
<title> </title> | |
<!--[if !mso]><!-- --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!--<![endif]--> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://mozilla.github.io/nunjucks/files/nunjucks.min.js"></script> | |
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
const Hapi = require("@hapi/hapi"); | |
const H2o2 = require("@hapi/h2o2"); | |
const { PassThrough } = require("stream"); | |
const trumpet = require("trumpet"); | |
const start = async function () { | |
const server = Hapi.server({ | |
host: "localhost", | |
port: 8000, | |
}); |
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
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = 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
/** | |
* Resolves all Promises from a key/val object, returning the same structure but resolved | |
* @param {Object.<string, (function)>} obj - An object with any number of key-value pairs. | |
* @returns {{ values: object, rejected: object }} | |
*/ | |
const labelledPromises = async (obj) => { | |
const keys = Object.keys(obj); | |
const promises = Object.values(obj); | |
const results = await Promise.allSettled(promises); |