Skip to content

Instantly share code, notes, and snippets.

View ShravanJ's full-sized avatar
🖥️
Building cool things

Shravan Jambukesan ShravanJ

🖥️
Building cool things
View GitHub Profile
@ShravanJ
ShravanJ / DeviceToken.cs
Created October 2, 2019 03:07
Get iOS 13 Device Token on Xamarin.iOS
public override async void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
var token = "";
/* Tokens generated on devices running iOS 13+ follow a different format which requires conversion for the backend to process them
More info: https://nshipster.com/apns-device-tokens/
*/
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
{
byte[] result = new byte[deviceToken.Length];
Marshal.Copy(deviceToken.Bytes, result, 0, (int)deviceToken.Length);
@ShravanJ
ShravanJ / QueryAppStoreRecord.sh
Last active February 6, 2019 17:36
Get information about an App Store app record from the command line (requires curl and jq)
#!/bin/bash
# Requires curl and jq (https://stedolan.github.io/jq/)
# To run, make executable with chmod +x then execute with ./QuerryAppStoreRecord.sh com.company.app
# For example, ./QueryAppStoreRecord org.videolan.vlc-ios
curl -s https://itunes.apple.com/lookup?bundleId=$1 | jq '.'
@ShravanJ
ShravanJ / gist:c196e1300c67ecb2d2c7
Created February 23, 2015 21:44
CracklePop solution
/**CracklePop for hackerschool.com application
*@author Shravan Jambukesan
*/
public class CracklePop{
public static void main(String[] args) {
for (int x = 1; x <= 100; x++)
{