Skip to content

Instantly share code, notes, and snippets.

View bob-codingdutchmen's full-sized avatar

Bob Vork bob-codingdutchmen

  • Coding Dutchmen
View GitHub Profile
@bob-codingdutchmen
bob-codingdutchmen / carrier.py
Created October 16, 2015 08:18
Change the carrier string in the iOS Simulator
# This script changes the Carrier string in the iPhone simulator
# to anything you want. It needs python3, and currently works when
# your Simulator is set to English. For other languages, change the
# 'language_code' variable to your language.
#
# This works for Xcode 7 and iOS 9, I havent tested on anything else.
#
# Usage: 'python3 carrier.py new_carrier'
#
# Bob Vork, 2015
@bob-codingdutchmen
bob-codingdutchmen / Sketch-android-export
Last active August 29, 2015 14:22
Export Sketch file to android dpi-folders without slices
#!/usr/bin/python
import os
import argparse
from subprocess import call
"""
This script should run with any recent version of python (2.7 or 3+)
For this to run, sketchtool should be available (download from http://bohemiancoding.com/sketch/tool/ )
@bob-codingdutchmen
bob-codingdutchmen / gist:a36a031415a2f5477ae5
Last active August 29, 2015 14:07
Simple password authentication
-(void)checkPassword {
[[MSAPIController sharedAPIController] authenticateWithPassword:self.passField.text
onComplete:^(BOOL success, NSInteger statusCode) {
if(success) {
[self proceed];
} else {
[self loginFailed];
}
}];
}
@bob-codingdutchmen
bob-codingdutchmen / gist:6869871
Created October 7, 2013 15:31
Basic setup for a test project for debugging lazy loading / saving with NSFileWrappers in a Document based application
//
// Document.m
// Wrappers
//
#import "Document.h"
#define FileName01 @"testfile1.txt"
#define FileName02 @"testfile2.txt"