Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Bojor robertBojor

View GitHub Profile
@robertBojor
robertBojor / RBRevGeo.h
Created Feb 13, 2015
Synchronous reverse GeoCoding using Google Maps API
View RBRevGeo.h
//
// RBRevGeo.h
// RevGeo
//
// Created by Robert Bojor on 13/02/15.
// Copyright (c) 2015 Robert Bojor. All rights reserved.
//
#import <Foundation/Foundation.h>
@robertBojor
robertBojor / increment.sh
Created Apr 7, 2015
Increment build number
View increment.sh
#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
@robertBojor
robertBojor / APIManager.swift
Last active Sep 21, 2015
ApiManager for Swift v2.0
View APIManager.swift
//
// APIManager.swift
//
// Created by Robert Bojor on 21/09/15.
// Copyright (c) 2015 Robert Bojor. All rights reserved.
//
import Foundation
public class ApiManager: NSObject {
View IndexHandler.swift
//
// IndexHandler.swift
// PerfectJSONEncoder
//
// Created by Robert Bojor on 06/05/16.
// Copyright © 2016 Robert Bojor. All rights reserved.
//
import Foundation
import PerfectLib
@robertBojor
robertBojor / AppErrors.swift
Last active May 21, 2016
Encoding dictionaries in Perfect
View AppErrors.swift
//
// AppErrors.swift
//
// Created by Robert Bojor on 21/05/16.
//
import PerfectLib
public struct AppErrors {
enum ErrorTypes:String {
View Generate CSR.txt
openssl genrsa -des3 -out x.key 2048
openssl req -new -newkey rsa:2048 -nodes -keyout x.key -out x.csr
View Convert SSL key & cert.txt
openssl x509 -in x.crt -out x.pem -outform PEM
openssl rsa -in x.key -out x.pem -outform PEM
View AWS SSL Upload.txt
AWS
Install awscli ( http://docs.aws.amazon.com/cli/latest/userguide/installing.html )
Login into client AWS console
Open IAM
Create X new users and assign IAMFullControl Policy
On local console, run (aws iam upload-server-certificate --server-certificate-name SSL_API --certificate-body file://lcapi.pem --private-key file://lcapi.key --certificate-chain file://ca.pem) to upload a certificate.
Assign the new user to each ElasticBeanstalk instance.
aws iam upload-server-certificate --server-certificate-name SSL_FMOB --certificate-body file://fmob.pem --private-key file://fmob.key --certificate-chain file://fmob.ca.pem
View Swift server-side proc run.txt
import PerfectLib
import Foundation
import Cocoa
#if os(Linux)
import SwiftGlibc
#else
import Darwin
#endif
@robertBojor
robertBojor / go_test.md
Last active Jul 25, 2017
GoLang Questions
View go_test.md

Questions

1. What is the output of the following program?

package main
import "fmt"
type User struct {
	Name string
}
var user User