Skip to content

Instantly share code, notes, and snippets.

View jasonicarter's full-sized avatar
🏠
Working from home

Jason jasonicarter

🏠
Working from home
View GitHub Profile
@fwhenin
fwhenin / OrderedDictionary.swift
Created December 18, 2014 20:23
Swift Ordered Dictionary
//
// OrderedDictionary.swift
// DMS
//
// Created by Freddy on 12/12/14.
// Copyright (c) 2014 DMSCompany. All rights reserved.
//
import Foundation
@mwermuth
mwermuth / UIBezier+Arrow.swift
Created September 11, 2014 14:01
Drawing an Arrow with Swift
extension UIBezierPath {
class func getAxisAlignedArrowPoints(inout points: Array<CGPoint>, forLength: CGFloat, tailWidth: CGFloat, headWidth: CGFloat, headLength: CGFloat ) {
let tailLength = forLength - headLength
points.append(CGPointMake(0, tailWidth/2))
points.append(CGPointMake(tailLength, tailWidth/2))
points.append(CGPointMake(tailLength, headWidth/2))
points.append(CGPointMake(forLength, 0))
points.append(CGPointMake(tailLength, -headWidth/2))
@webaware
webaware / force-ssl-url-scheme.php
Last active September 3, 2023 00:05
For WordPress, force the protocol scheme to be HTTPS when is_ssl() doesn't work, e.g. on a load-balanced server where _SERVER['HTTPS'] and _SERVER['SERVER_PORT'] don't indicate that SSL is being used. NB: may not be needed now, see SSL Insecure Content Fixer and HTTP Detection: https://ssl.webaware.net.au/https-detection/
<?php
/*
Plugin Name: Force SSL URL Scheme
Plugin URI: https://gist.github.com/webaware/4688802
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work
Version: 1.0.0
Author: WebAware
Author URI: http://webaware.com.au/
@ref: http://wordpress.org/support/topic/ssl-insecure-needs-35-compatibility