For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// perform any custom startup stuff you need to ... | |
// process your launch options | |
NSArray *keyArray = [launchOptions allKeys]; | |
if ([launchOptions objectForKey:[keyArray objectAtIndex:0]]!=nil) | |
{ | |
// we store the string, so we can use it later, after the webView loads | |
NSURL *url = [launchOptions objectForKey:[keyArray objectAtIndex:0]]; | |
self.invokeString = [url absoluteString]; |
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
// A simple Tweet POJO: | |
// $> javac TweetEvent.java | |
public class TweetEvent { | |
private String user; | |
private String text; | |
private String timezone; | |
private int retweets; | |
public TweetEvent(String user, String text, String timezone, int retweets) { |
#region Using | |
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
#endregion | |
namespace YourApp.Security.Cryptography | |
{ |
load 'deploy/assets' | |
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
%x{bundle exec rake assets:precompile} | |
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}} | |
%x{bundle exec rake assets:clean} | |
end |
var fs = require("fs") | |
var ssl_options = { | |
key: fs.readFileSync('privatekey.pem'), | |
cert: fs.readFileSync('certificate.pem') | |
}; | |
var port = process.env.PORT || 3000; | |
var express = require('express'); | |
var ejs = require('ejs'); | |
var passport = require('passport') |
// Usage: | |
// val dircache = new CachedMkdir | |
// dircache.mkdirp("a/b/c/d/e") // creates the directory structure | |
// dircache.mkdirp("a/b/c/d/e") // does nothing | |
// dircache.mkdirp("a/b/Z/Y/Z") // only creates from b/ down | |
class CachedMkdir { | |
var cache = Set[String]() |
// HTTP forward proxy server that can also proxy HTTPS requests | |
// using the CONNECT method | |
// requires https://github.com/nodejitsu/node-http-proxy | |
var httpProxy = require('http-proxy'), | |
url = require('url'), | |
net = require('net'), | |
http = require('http'); |
import scala.xml.{Node => XmlNode} | |
import scala.xml._ | |
import java.io.FileWriter | |
import sbt._ | |
import Keys._ | |
import AndroidKeys._ | |