Skip to content

Instantly share code, notes, and snippets.

View b099l3's full-sized avatar
🏃‍♂️

Iain Smith b099l3

🏃‍♂️
View GitHub Profile
@b099l3
b099l3 / SystemCodeSnippets.codesnippets
Created October 21, 2013 09:49
Setting default code snippets in xCode 5. Drop thsi file into /Applications/Xcode.app/Contents/PlugIns/IDECodeSnippetLibrary.ideplugin/Conten‌​ts/Resources/SystemCodeSnippets.codesnippets and restart xcode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>IDECodeSnippetVersion</key>
<integer>1</integer>
<key>IDECodeSnippetCompletionPrefix</key>
<string>@protocol</string>
<key>IDECodeSnippetContents</key>
@b099l3
b099l3 / SetDefaultxCodeSnippets.command
Last active December 26, 2015 02:59
command to set the default code snippets.
#!/bin/bash
echo -e "\n Setting xCode code snippets \n "
git clone git://gist.github.com/7081353.git tempgitdir
mv tempgitdir/* /Applications/Xcode.app/Contents/PlugIns/IDECodeSnippetLibrary.ideplugin/Contents/Resources
rm -rf tempgitdir
echo -e "\n Adding xCode Themes \n "
git clone git://gist.github.com/7115836.git tempgitdir
mv tempgitdir/* ~/Library/Developer/Xcode/UserData/FontAndColorThemes
@b099l3
b099l3 / Enterprise.dvtcolortheme
Created October 23, 2013 10:00
Theme I use, Put it here: /Users/YOURUSERNAME/Library/Developer/Xcode/UserData/FontAndColorThemes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 0.4 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.222547 1 0.873015 1</string>
#!/bin/bash
incrementBuildnumber ()
{
echo "\n ********************** Build Number++ Started ********************** \n"
BRANCH_NAME=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
git symbolic-ref --short HEAD
git reset --hard origin/$BRANCH_NAME
git branch --set-upstream-to=origin/$BRANCH_NAME $BRANCH_NAME
git pull
@b099l3
b099l3 / WCSessionManager.cs
Last active October 17, 2023 21:06
A Session manager for watchOS and iOS xamarin. Can be used in both xamarin.iOS and xamarin.watchOS
using System.Collections.Generic;
using System.Linq;
using Foundation;
using Newtonsoft.Json;
using System;
namespace WatchConnectivity
{
public sealed class WCSessionManager : WCSessionDelegate
{
@b099l3
b099l3 / gist:2cb4d924cb2c166b5cc41c97a3509df0
Last active October 10, 2017 10:46
Add Reveal to Xamarin project
{"v":"4.6.2","fr":25,"ip":0,"op":104,"w":1921,"h":1082,"nm":"Fringe_logo - fast - converted to shapes","ddd":0,"assets":[{"id":"comp_2","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"s22 Outlines","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[1178.155,711.465,0]},"a":{"a":0,"k":[357.943,166.113,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"ef":[{"ty":5,"nm":"Linear Wipe","mn":"ADBE Linear Wipe","ix":1,"en":1,"ef":[{"ty":0,"nm":"Transition Completion","mn":"ADBE Linear Wipe-0001","ix":1,"v":{"a":0,"k":0}},{"ty":0,"nm":"Wipe Angle","mn":"ADBE Linear Wipe-0002","ix":2,"v":{"a":0,"k":248}},{"ty":0,"nm":"Feather","mn":"ADBE Linear Wipe-0003","ix":3,"v":{"a":0,"k":50}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"a":0,"k":{"i":[[-148.492,25.096],[0,0],[81.202,-23.737],[129.619,-51.908],[0,0],[0,0],[0,0],[-55.788,16.243]],"o":[[0,0],[-154.917,26.314],[-59.314,17.064],[0,0],[0,0],[0,0],[125.964,-50.229],[75.338,-21.947]],"v":[[357.693,-26.193],[334.249,-165.862],[-19.93,-90.785],[-303.33,12.672],[-357.
You can check the entitlements needed by your app using the following command in Terminal. When you unzip your .ipa file, you will get the Payload folder. Navigate to the same directory the Payload folder is in before executing the command:
>codesign -d --entitlements :- "Payload/YourApp.app"
Then, you can check what entitlements are included in the provision with
>security cms -D -i "Payload/YourApp.app/embedded.mobileprovision"
This output can help show where the mismatch is.
@b099l3
b099l3 / Branches.txt
Last active November 1, 2018 11:49
Branch stats
// List all branches in last commit date order
git for-each-ref --sort=committerdate refs/remotes/ --format='%(committerdate:short) %(refname:short)'
// List all branches in last commit date order with last comitter name
git for-each-ref --sort=committerdate refs/remotes/ --format='%(committerdate:short) %(committername) %(refname:short)'
// List all branches that have been merged including local branches sorted by commiter date desc
git branch -a --sort=committerdate --merged

Used to create a list of dummy items

public List<Item> Items { get; set; } = Enumerable.Range(1, 200)
                                                  .Select(i => new Item 
                                                  { 
                                                      AutomationId = i, 
                                                      Label = $"Option Number {i}" 
                                                  }).ToList();