Skip to content

Instantly share code, notes, and snippets.

@yelled3
yelled3 / install_certificates.py
Created March 17, 2019 09:00
Python 3 Install Certificates
# Based on: https://github.com/python/cpython/blob/master/Mac/BuildScript/resources/install_certificates.command
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.org/project/certifi/
import os
import os.path
import ssl
@yelled3
yelled3 / introrx.md
Created September 30, 2017 10:02 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@yelled3
yelled3 / gist:10447754
Created April 11, 2014 07:49
Rspec: Negation Matcher - description_when_negated
expect([1, 2, 3]).to ~include(3)
class Negation < BaseMatcher
def failure_message
matcher.failure_message_when_negated
end
end
@yelled3
yelled3 / gist:6917064
Created October 10, 2013 11:43
not sure yet...
@implementation TopViewController
- (void)viewDidLoad{
[super viewDidLoad];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
NSDictionary *views = @{@"topGuide": self.topLayoutGuide, @"mainView": self.view};
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[topGuide]-20-[mainView]"
@yelled3
yelled3 / gist:6881965
Last active August 23, 2017 15:15
UINavigationBar with totally transparent background (iOS6 + iOS7 tested)
#import <UIKit/UIKit.h>
@interface MyCustomNavigationBar : UINavigationBar
@end
@implementation MyCustomNavigationBar
- (id)initWithFrame:(CGRect)frame
{