#Single Page Application ###RequireJS, BackboneJS, Jquery
This file contains hidden or 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() { | |
var FADE_TIME = 150; // ms | |
var TYPING_TIMER_LENGTH = 400; // ms | |
var COLORS = [ | |
'#e21400', '#91580f', '#f8a700', '#f78b00', | |
'#58dc00', '#287b00', '#a8f07a', '#4ae8c4', | |
'#3b88eb', '#3824aa', '#a700ff', '#d300e7' | |
]; | |
// Initialize varibles |
This file contains hidden or 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
package << package >>; | |
import java.io.*; | |
import java.util.*; | |
import javax.mail.*; | |
import javax.mail.event.*; | |
import javax.mail.internet.*; | |
public class TestMail { | |
public TestMail() {} |
This file contains hidden or 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
require.config({ | |
paths: { | |
text: '/assets/js/vendor/require/text.min', | |
pace: '/assets/js/vendor/pace/pace.min', | |
jquery: '/assets/js/vendor/jquery/jquery.min', | |
underscore: '/assets/js/vendor/underscore/underscore.min', | |
backbone: '/assets/js/vendor/backbone/backbone.min', | |
bootstrap: '/assets/js/vendor/bootstrap/bootstrap.min', | |
enquire: '/assets/js/vendor/enquire/enquire.min', | |
templates: '/templates' |
This file contains hidden or 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
// | |
// currentLocation.swift | |
// Current Location | |
// | |
// Created by Kurtis Dunn on 21/08/2015. | |
// Copyright © 2015 Kurtis Dunn. All rights reserved. | |
// | |
import UIKit | |
import MapKit |
This file contains hidden or 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
jumbtron: function() { | |
$(jumbtron.h1).addClass('animated ' + 'fadeInLeftBig').appendTo(".jumbotron"); | |
setTimeout( function() { $('.cloud').textillate({ in: { effect: 'fadeInLeftBig' } }); }, 200); | |
setTimeout( function() { $(jumbtron.h2).addClass('animated ' + 'fadeInRightBig').appendTo(".jumbotron"); }, 700); | |
setTimeout( function() { $(jumbtron.btn).addClass('animated ' + 'fadeInUp').appendTo(".jumbotron"); }, 1000); | |
} |
This file contains hidden or 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 nodemailer = require('nodemailer'); | |
app.post('/mail', function(req, res) { | |
// Initial REST load | |
// create reusable transporter object using SMTP transport | |
var transporter = nodemailer.createTransport({ | |
service: 'Gmail', | |
auth: { | |
user: '<<username>>', | |
pass: '<<password>>' |
This file contains hidden or 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
LAContext *myContext = [[LAContext alloc] init]; | |
NSError *authError = nil; | |
NSString *myReasonString = @"String explaining why app needs authentication"; | |
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) { | |
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics | |
localizedReason:myReasonString | |
reply:^(BOOL succes, NSError *error) { | |
if (success) { | |
// User authenticated successfully |
This file contains hidden or 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
let myContext = LAContext() | |
var authError: NSError? | |
// Set the reason string that will appear on the authentication alert. | |
var myReasonString = "String explaining why app needs authentication" | |
if myContext.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: &authError) { | |
[myContext.evaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, localizedReason: myReasonString, reply: { (success: Bool, evalPolicyError: NSError?) -> Void in | |
if success { |
####PHP cheat sheet.