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
public class FontCreator | |
{ | |
private string _fontName; | |
private Dictionary<float, UIFont> _lookup = new Dictionary<float, UIFont> (); | |
public FontCreator (string fontName) | |
{ | |
_fontName = fontName; | |
} |
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
///<summary>Allows slim locks to be requesed using(LOCK.WriteLock()){ ... } syntax</summary> | |
public static class LockExtensions | |
{ | |
public class DisposableCallback : IDisposable | |
{ | |
public void Dispose () | |
{ | |
_callback (); | |
} |
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
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
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
@IBDesignable | |
class TranslateResizeMaskToConstraints: UIView { | |
@IBInspectable var Enabled:Bool = false | |
private var _interfaceBuilderContext = false | |
override func awakeFromNib() { | |
super.awakeFromNib() | |
setTranslatesAutoresizingMaskIntoConstraints(Enabled || _interfaceBuilderContext) |
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
Here is what you need to do to register your app for a custom URL scheme (for the example we will use a "myapp" scheme). | |
1) In your Info.plist, add a new entry for CFBundleURLTypes: | |
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleURLName</key> | |
<string>MyApp's URL</string> | |
<key>CFBundleURLSchemes</key> |
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
{ | |
"repositories": [{ | |
"type": "composer", | |
"url": "https://packagist.org" | |
}] | |
} |
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
struct Jawn { | |
let value:AnyObject? | |
var string:String? { return self.value as? String } | |
var int:Int? { return self.value as? Int } | |
var double:Double? { return self.value as? Double } | |
var array:[Jawn]? { return (self.value as? NSArray)?.map{Jawn($0)} } | |
var bool:Bool? { return self.value as? Bool } | |
var dictionary:[String:Jawn]? { | |
guard let dictionary = self.value as? NSDictionary else { |
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
struct Jawn { | |
let value:AnyObject? | |
var string:String? { return self.value as? String } | |
var int:Int? { return self.value as? Int } | |
var double:Double? { return self.value as? Double } | |
var array:[Jawn]? { return (self.value as? NSArray)?.map{Jawn($0)} } | |
var bool:Bool? { return self.value as? Bool } | |
var dictionary:[String:Jawn]? { | |
guard let dictionary = self.value as? NSDictionary else { |
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
<?php | |
return [ | |
'username' => env('<YOUR_POSTMARK_SERVER_TOKEN>'), | |
'password' => env('<YOUR_POSTMARK_SERVER_TOKEN>'), | |
'host' => env('MAIL_HOST', 'smtp.postmarkapp.com'), | |
// Optionally, set "smtp" to "log" if you want to trap emails during testing. |
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
using Mono.Cecil; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Xml.Serialization; | |
namespace CecilTest |