Skip to content

Instantly share code, notes, and snippets.

View BrunoVillanova's full-sized avatar

Bruno Villanova BrunoVillanova

View GitHub Profile
@BrunoVillanova
BrunoVillanova / install-comodo-ssl-cert-for-nginx.rst
Created January 3, 2019 13:12 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@BrunoVillanova
BrunoVillanova / bash
Created January 30, 2017 22:51
Replace non-ascii chars from bash string
echo '$' | iconv -f utf8 -t ascii//TRANSLIT
- (void)showNavigationBar {
if (!navigationBarIsHidden) {
return;
}
[UINavigationBar beginAnimations:@"NavBarFadeIn" context:nil];
self.navigationController.navigationBar.alpha = 0;
UIColor *color = [UIColor blackColor];
NSMutableDictionary *titleTextAttributes = [self.navigationController.navigationBar.titleTextAttributes mutableCopy];
titleTextAttributes[NSForegroundColorAttributeName] = color;
UIGraphicsBeginImageContext(self.view.frame.size);
[[UIImage imageNamed:@"image"] drawInRect:self.view.bounds];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.view.backgroundColor = [UIColor colorWithPatternImage:image];
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//.. do other setup
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
// Transition neatly from splash screen
// Very odd, on iPhone 5 you need to position the splash screen differently..