Skip to content

Instantly share code, notes, and snippets.

View wbroek's full-sized avatar

Wouter van den Broek wbroek

View GitHub Profile
wbroek /
Created October 17, 2017 09:30 — forked from nowke/
Retrofit - OkHTTP Connect to Self signed SSL Enabled Server: (Fix for CertPathValidatorException: Trust Anchor for certificate path not found) - Self Signing Client Bulider for Retrofit OkHTTP
public class MainActivity extends AppCompatActivity {
Retrofit retrofit;
protected void onCreate(Bundle savedInstanceState) {
// TextView subclass that replicates TVOS movies app
// Also made a quick presentation controller
// Just connect the delegate to the ViewController in IB
// and set the TextView class to FocusTextView
import UIKit
class TextPresentationViewController:UIViewController {
let label = UILabel()
let blurStyle = UIBlurEffectStyle.Dark
wbroek / .htaccess
Last active April 18, 2017 14:34 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
wbroek /
Last active August 29, 2015 14:06 — forked from stayallive/
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh
# Get us a clean working directory
mkdir /php
wbroek / update_xcode_plugins
Last active August 29, 2015 14:06 — forked from neonichu/update_xcode_plugins
Make Xcode plugins compatible with latest Xcode installed on system (Xcode 6 atm)
function add_compatibility() {
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \
function has_compatibility() {
#import <UIKit/UIKit.h>
@interface UIView (SMFrameAdditions)
@property (nonatomic, assign) CGPoint $origin;
@property (nonatomic, assign) CGSize $size;
@property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties
@property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect
wbroek / .gitignore
Created April 6, 2012 07:15 — forked from Abizern/.gitignore
Global git ignore file
# Mac OS X
# Xcode