Skip to content

Instantly share code, notes, and snippets.

View Duraiamuthan's full-sized avatar

Durai Amuthan Duraiamuthan

View GitHub Profile
@Duraiamuthan
Duraiamuthan / Unique identifiers
Created April 5, 2014 09:31
UDID vs UUID vs GUID
UUID:
It is the acronym of Universally Unique Identifier.
A sequence of 128 bits that can guarantee uniqueness across space and time, defined by RFC 4122.
GUID:
It is the acronym of Globally Unique Identifier
It is Microsoft's implementation of the UUID specification; often used interchangeably with UUID.
In dot net framework its called as Plain GUID and in sql server its called as newid
UDID:
@Duraiamuthan
Duraiamuthan / gist:53922c04877fc6a11f9369920b97e666
Created December 11, 2017 23:01
Circular progress bar with animation pause and resume
#import "ViewController.h"
@interface ViewController (){
}
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
@Duraiamuthan
Duraiamuthan / gist:f2cf94ef8c43bc5c5ce3bba13bf8d96d
Created December 1, 2017 20:39
Re-usable windows phone overlay cum progress bar
<Grid Background="#C444" Visibility="{Binding showOverlay, Converter={StaticResource BoolToVisibleOrCollapsed}}">
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
<ProgressBar Margin="0,15,0,0"
IsIndeterminate="{Binding showOverlay}"
IsEnabled="{Binding showOverlay}" Foreground="Black"/>
<TextBlock Visibility="Visible" Margin="6,6,6,15" Foreground="Black" FontSize="21" TextWrapping="WrapWholeWords" HorizontalAlignment="Center" Text="Loading..."/>
</StackPanel>
</Grid>
<?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>method</key>
<string>development</string>
<key>compileBitcode</key>
<false/>
</dict>
</plist>
@Duraiamuthan
Duraiamuthan / gist:84a2edb1524e5dce373b7b639cfdd98d
Created September 13, 2017 13:09
Xamarin Exception Stack(its a crash report)
Xamarin Exception Stack:
System.ArgumentException: Set Method not found for 'Enabled'
at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) <0x10025f858 + 0x00168> in <2f4074c3120b4d80802e10af84b67d41#da126b4d390eed35c2c737c64ac20e68>:0
at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value, System.Object[] index) <0x100260108 + 0x00027> in <2f4074c3120b4d80802e10af84b67d41#da126b4d390eed35c2c737c64ac20e68>:0
at GalaSoft.MvvmLight.Helpers.Binding`2[TSource,TTarget].SetTargetValue (TTarget value) <0x1000b3c64 + 0x0008f> in <2c294505267144d49f6bddafbd88d65a#da126b4d390eed35c2c737c64ac20e68>:0
at GalaSoft.MvvmLight.Helpers.Binding`2[TSource,TTarget].Attach () <0x1000b2734 + 0x001f3> in <2c294505267144d49f6bddafbd88d65a#da126b4d390eed35c2c737c64ac20e68>:0
at GalaSoft.MvvmLight.Helpers.Binding`2[TSource,TTarg
@Duraiamuthan
Duraiamuthan / gist:13543ee4ec1115f3c6b263b76b2d8d7c
Last active June 30, 2017 11:21
MT4109 Failed to compile the generated registrar code - My IDE Information
=== Visual Studio Community 2017 for Mac ===
Version 7.0.1 (build 24)
Installation UUID: 31d15ad0-e2b9-4dc5-bc31-0d1691b70a29
Runtime:
Mono 5.0.1.1 (2017-02/5077205) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500010001
@Duraiamuthan
Duraiamuthan / gist:27c952cd6c0ac0269f0b084baa9ef169
Created June 30, 2017 11:18
MTOUCH : error MT4109: Failed to compile the generated registrar code. - Error log
Building: MyTestProject.iOS (Debug|iPhone)
Build started 30/06/2017 12:07:11.
__________________________________________________
Project "/Users/durai/Documents/New/MyTestProject/MyTestProject/MyTestProject.csproj" (Build target(s)):
Target ResolveAssemblyReferences:
A TargetFramework profile exclusion list will be generated.
Primary reference "Mono.Android".
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Mono.Android". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
For SearchPath "{HintPathFromItem}".
This file has been truncated, but you can view the full file.
<html>
<body>
base 64 image <br>
<img id='base64image' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='><br>
base 64 video
<video id='base64video' width='320' height='240' controls>
<source src='data:video/x-m4v;base64,AAAAFGZ0eXBxdCAgAAAAAHF0ICAAABGbbW9vdgAAAGxtdmhkAAAAANPPfw7Tz38QAAACWAAAAwsA
AQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAA2h0cmFrAAAAXHRraGQAAAAP089/DtPPfxAAAAABAAAA
AAAAAwsAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAA
@Duraiamuthan
Duraiamuthan / re-sign-ios-app.md
Last active June 28, 2016 13:43 — forked from chaitanyagupta/re-sign-ios-app.md
How to re-sign an iOS app with another developer account

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

  1. Unzip the .ipa. This will usually unzip to Payload/.app/
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string>Disables home</string>
<key>PayloadDisplayName</key>