I hereby claim:
- I am justin on github.
- I am justinwme (https://keybase.io/justinwme) on keybase.
- I have a public key ASDBnz525aVsN7y7rHcRDjMt2ZOyhPTwUniM0mSxrtJpzwo
To claim this, I am signing this object:
| #!/usr/bin/env zsh | |
| # | |
| # Convenience wrapper around the simctl command to perform operations related to iOS simulators. | |
| # Author: Justin Williams (@justin) | |
| # | |
| # Usage: sim <options> <subcommand> | |
| # | |
| # This script is designed to work with ZSH. ymmv with other shells. | |
| set -e |
| #!/bin/zsh | |
| # | |
| # Check for the existence of an .xcoderc in the root of a project and update the DEVELOPER_DIR | |
| # to point to that specific version of Xcode. Update Carthage dependencies as well. | |
| # | |
| # This is useful for all the switching between Xcode 10.x and 11.x as I am doing presently. | |
| # | |
| # Usage: | |
| # xcode_switch [--no-bootstrap] [version_number] | |
| # |
I hereby claim:
To claim this, I am signing this object:
| import KeychainAPI | |
| let keychain: Keychain = Keychain(service: "com.secondgear.myapp", accessibility: Accessibility.WhenUnlocked) | |
| let userAccount = Account(userName: "justinw@me.com", secret: "lovesecretsexgod") | |
| keychain.add(userAccount) | |
| let fetchedAccount:Account? = keychain.accountFor("justinw@me.com") | |
| if (fetchedAccount != nil) | |
| { | |
| fetchedAccount?.secret = "newpassword" |
| UIDevice *device = [UIDevice currentDevice]; | |
| UIDeviceOrientation currentOrientation = device.orientation; | |
| BOOL isPhone = (device.userInterfaceIdiom == UIUserInterfaceIdiomPhone); | |
| BOOL isTallPhone = ([[UIScreen mainScreen] bounds].size.height == 568.0); | |
| if (UIDeviceOrientationIsPortrait(currentOrientation) == YES) | |
| { | |
| // Do Portrait Things | |
| if (isPhone == YES) | |
| { | |
| // Do Portrait Phone Things |
| public async void RemoveDevices() | |
| { | |
| CloudTableClient client = account.CreateCloudTableClient(); | |
| CloudTable devicesTable = client.GetTableReference("PushNotificationDeviceTable"); | |
| //// Good Form | |
| await devicesTable.CreateIfNotExistsAsync(); | |
| // Entity Resolver | |
| EntityResolver<PushNotificationDevice> deviceResolver = (pk, rk, ts, props, etag) => |
| #import <objc/objc-runtime.h> | |
| #import "UIView+SGAutoLayoutExtensions.h" | |
| @implementation UIView (SGAutoLayoutExtensions) | |
| #ifdef DEBUG | |
| - (NSString *)nsli_description | |
| { | |
| return [self restorationIdentifier] ?: [NSString stringWithFormat:@"%@:%p", [self class], self]; |
| import statusInfo = require('./StatusInfo'); | |
| import commentInfo = require('./CommentInfo'); | |
| var uuid = require('node-uuid'); | |
| /** | |
| Various types of user notifications that we can send. | |
| The numeric values are sent to the client apps (Android, iOS, etc) so be careful changing them | |
| */ | |
| enum NotificationType { |
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <system.webServer> | |
| <modules runAllManagedModulesForAllRequests="false" /> | |
| <httpErrors errorMode="Custom" existingResponse="Replace"> | |
| <remove statusCode="404" /> | |
| <error statusCode="404" responseMode="File" path="404.html" /> | |
| </httpErrors> | |
| <rewrite> | |
| <rules> |
| BOOL RSHasMarkdownLinks(NSString *x) | |
| { | |
| NSString *searchText = x; | |
| NSError *error = NULL; | |
| NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\[([^\\[]+)\\]\\(([^\\)]+)\\)" options:0 error:&error]; | |
| NSUInteger numberOfMatches = [regex numberOfMatchesInString:searchText options:0 range:NSMakeRange(0, [searchText length])]; | |
| return (numberOfMatches > 0); | |
| } |