- View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
- View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
- HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
- String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
#/bin/bash | |
# | |
# https://twitter.com/samykamkar/status/1011166802880020482 | |
# Sniff network traffic from your iOS device, no jailbreak necessary! Just plug into your mac and run: | |
system_profiler SPUSBDataType|perl -0 -ne'/iP(?:hone|ad):.*?Serial Number: (\S+)/s?`rvictl -s $1`:0' ; sudo tcpdump -i rvi0 # standard tcpdump options/filters apply |
- no upfront installation/agents on remote/slave machines - ssh should be enough
- application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
- configuration templating
- environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
- deployment process run from Jenkins
// require deployd | |
var deployd = require('deployd'); | |
// configure database etc. | |
var server = deployd({ | |
port: process.env.PORT || 1337, | |
env: 'production', | |
db: { connectionString: process.env.MONGO_URL } | |
}); |
#Two Factor Authentication with Drywall and Twilio
Two factor authentication is where you check that the user both knows something (e.g. a password) and has something (e.g. a cellphone). One way to do the latter is to send the user an SMS message.
If you have a site with users, there are a number of possible ways you could add two factor authentication.
- Password + SMS code at signup
- Password + SMS code at login
- In a normal session, popup SMS code verification request
var loopback = require('loopback'); | |
// HINT(s): | |
// Getting the app object: http://docs.strongloop.com/display/public/LB/Working+with+LoopBack+objects | |
// From a model script: http://docs.strongloop.com/display/public/LB/Working+with+LoopBack+objects#WorkingwithLoopBackobjects-Fromamodelscript | |
module.exports = function(StoreModel) { | |
StoreModel.prototype.instanceRemoteMethodSignature = function(cb) { | |
console.log('print this instance object: ', this); | |
cb(null); | |
}; |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
UIContentSizeCategoryExtraSmall | |
FontStyle: UICTFontTextStyleBody | |
Point size 14.000000 | |
Family Name .AppleSystemUIBody | |
FontStyle: UICTFontTextStyleHeadline | |
Point size 14.000000 | |
Family Name .AppleSystemUIHeadline | |
Bold | |
FontStyle: UICTFontTextStyleSubhead | |
Point size 12.000000 |
// | |
// YMKeyboardLayoutHelperView.m | |
// ios-chat | |
// | |
// Created by Steven Hepting on 7/17/13. | |
// Copyright (c) 2013 Yammer. All rights reserved. | |
// | |
#import "YMKeyboardLayoutHelperView.h" | |
#import "UIView+LayoutAdditions.h" |