Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
import UIKit | |
import RxSwift | |
import RxAlamofire | |
import ObjectMapper | |
class Post: Mappable { | |
var id: Int = 0 | |
var title: String = "" | |
required init?(_ map: Map) { |
Last Updated: March 2023
IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.
Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.
P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.
Long live the web!
extension String { | |
var localized: String { | |
return NSLocalizedString(self, comment: "") | |
} | |
} | |
// Which allows for: | |
"Hello world".localized |
// derived from https://www.veasoftware.com/posts/uipageviewcontroller-in-swift-xcode-62-ios-82-tutorial | |
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
window!.rootViewController = ViewController() |
Using JSON in Postgres by example.
docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
function getCardType(cardNum) { | |
if(!luhnCheck(cardNum)){ | |
return ""; | |
} | |
var payCardType = ""; | |
var regexMap = [ | |
{regEx: /^4[0-9]{5}/ig,cardType: "VISA"}, | |
{regEx: /^5[1-5][0-9]{4}/ig,cardType: "MASTERCARD"}, | |
{regEx: /^3[47][0-9]{3}/ig,cardType: "AMEX"}, |
/** | |
* Author: Ats Uiboupin, see https://github.com/jmesnil/stomp-websocket/issues/61 | |
* it is possible to use other type of WebSockets by using the Stomp.over(ws) method. This method expects an object that conforms to the WebSocket definition. | |
* TODO specifi minimal required object structure, see SockJS as an acceptable example: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/sockjs/sockjs.d.ts#L23 | |
*/ | |
declare type StompMinimalWebSocketDefinition = any; | |
declare type StompWebSocketDefinition = WebSocket | StompMinimalWebSocketDefinition | SockJS; | |
declare type StompHeaders = { [key: string ]: string;}; | |
declare type StompSubscriptions = { [key: string ]: string;}; |
Assume the user is on a mobile device iOS Safari (Or other browser), but you want a link to open into any other specific mobile browser app like Chrome, Safari, Firefox, Opera, Arc... How do you do that?
To open on Chrome
<a href="googlechrome://example.com">try it on Chrome</a>
check out Chrome iOS Docs for more information
/** | |
* Created by gokhanbarisaker on 8/30/15. | |
*/ | |
public class PicassoDecoder implements ImageDecoder | |
{ | |
private String tag; | |
private String picasso; | |
public PicassoDecoder(String tag, Picasso picasso) { | |
this.tag = tag; |