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
public static void ForEach<T>(this IEnumerable<T> items, Action<T> action) | |
{ | |
foreach (var item in items) | |
{ | |
action(item); | |
} | |
} |
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
window.onerror = function (message, file, line) { | |
window.external.Notify("Error in Application: " + message + ". Source File: " + file + ", Line: " + line); | |
} |
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
<canvas id="user-icon" width="256" height="256"></canvas> |
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 lang="en"> | |
<head> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"/> | |
</head> | |
<body class="wrapper"> | |
<ul> | |
<li class="facebook"> |
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
NSString* doc = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | |
NSString* lib = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | |
float version = [[[UIDevice currentDevice] systemVersion] floatValue]; | |
if (version < 5.1) | |
{ | |
u_int8_t b = 1; | |
setxattr([doc fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0); | |
setxattr([lib fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0); |
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 data = (function () { | |
var data = {}; | |
var mins = 5; | |
var baseUrl = "http://.../api/"; | |
data.get = function (key, successCb, errorCb) { | |
var raw = JSON.parse(localStorage.getItem(key)); | |
if (!raw || !raw.expiry || new Date().getTime() >= raw.expiry) { | |
getFromApi(key, successCb, errorCb); | |
return; |
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
<canvas id="user-icon" width="256" height="256"></canvas> |
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
/* | |
THIS GIST IS OUT OF DATE AND NOT MONITORED | |
PLEASE SEE https://github.com/leecrossley/cordova-plugin-shake-detection | |
*/ | |
var shake = (function () { | |
var shake = {}, | |
watchId = null, | |
options = { frequency: 300 }, | |
previousAcceleration = { x: null, y: null, z: null }, |
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
auth0.auth | |
.passwordlessWithSMS({ | |
phoneNumber: "+447555555555", // validate input - format +44 | |
send: "code", | |
}) | |
.then(goToVerifyCode) | |
.catch(() => { | |
Alert.alert( | |
"We're sorry!", | |
"We couldn't send your code, please check your number and try again.", |
OlderNewer