This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using MonoTouch.UIKit; | |
| namespace System | |
| { | |
| public static class ExtensionMethods | |
| { | |
| public static UIColor ToUIColor(this string hexString) | |
| { | |
| hexString = hexString.Replace("#", ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override void OnActivated (UIApplication application) | |
| { | |
| //When your app is backgrounded, iOS takes a snapshot. | |
| //When the app comes back from the background it shows this snapshot at launch until your app is ready | |
| //Sometimes apple forgets to remove the splash screen. | |
| //Your app is in the forground and working. To prove it you can rotate, and see half your real screen. | |
| //To prevent this from happening you can manually remove the view | |
| foreach (var w in application.Windows) { | |
| if (w != null && w != window) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input[type=checkbox] { display:none; } | |
| input[type=checkbox] + label:before { | |
| font-family: FontAwesome; | |
| display: inline-block; | |
| content: "\f096"; | |
| letter-spacing: 10px; | |
| } | |
| input[type=checkbox]:checked + label:before { | |
| content: "\f046"; | |
| letter-spacing: 5px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public const int KEY_SIZE = 16; | |
| public byte[] Encrypt (string password, string input) | |
| { | |
| var sha256CryptoServiceProvider = new SHA256CryptoServiceProvider(); | |
| var hash = sha256CryptoServiceProvider.ComputeHash(Encoding.UTF8.GetBytes(password)); | |
| var key = new byte[KEY_SIZE]; | |
| var iv = new byte[KEY_SIZE]; | |
| Buffer.BlockCopy(hash, 0, key, 0, KEY_SIZE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Foundation; | |
| using UIKit; | |
| using TwinCoders.TouchUtils.Extensions; | |
| using CoreGraphics; | |
| namespace SalesForce.Touch.Views | |
| { | |
| public abstract partial class ParentViewController | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #r "Newtonsoft.Json" | |
| #r "System.Configuration" | |
| #r "Microsoft.IdentityModel.Clients.ActiveDirectory.dll" | |
| using System.Net; | |
| using System.Configuration; | |
| using System.Security.Claims; | |
| using System.Net.Http.Headers; | |
| using Newtonsoft.Json; | |
| using Microsoft.IdentityModel.Clients.ActiveDirectory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-Package | Uninstall-Package -RemoveDependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <MSDeployPublishMethod>RemoteAgent</MSDeployPublishMethod> | |
| <AuthType>NTLM</AuthType> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # place this script and your 1024x1024 icon in the same directory then run | |
| # usage sh makeicons.sh [nameof1024file.png] | |
| declare dir=$(pwd) | |
| declare -a sizes=( 16 20 29 32 40 48 50 55 57 58 60 64 72 76 80 87 88 100 114 120 128 144 152 167 172 180 196 256 512 1024 ) | |
| for i in "${sizes[@]}" | |
| do | |
| sips --resampleWidth "$i" "${dir}/${1}" --out "${dir}/Icon-$i.png" |