Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Vineet Choudhary vineetchoudhary

🏠
Working from home
View GitHub Profile
@vineetchoudhary
vineetchoudhary / RealmExtension.cs
Last active Jun 24, 2020
Get a standalone / unmanaged / Clone RealmObject using Realm Xamarin
View RealmExtension.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using Realms;
namespace ProjectName.Core.Extensions
{
public static class RealmExtension
{
@vineetchoudhary
vineetchoudhary / build.sh
Created Jul 2, 2018
Build script which use to create a multi-architecture shared library that will work on an iOS device and the simulator for the any library. (Xamarin.iOS)
View build.sh
#xcodebuild location
XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
#Project root
PROJECT_ROOT=/Volumes/LongTime/Shared/RESideMenu/
#Complete Project Path
PROJECT=/Volumes/LongTime/Shared/RESideMenu/RESideMenu.xcodeproj
#Target Name
View Whatsapp.py
# SWAMI KARUPPASWAMI THUNNAI
# ============================================================
# Simple yet Hackable! WhatsApp API [UNOFFICIAL] for Python3
# Note: The author gives permission to use it under Apache 2.0
# Special Thanks To: alecxe, For reviewing my code!
# ============================================================
import time
import datetime as dt
View JenkinsStart.sh
#!/bin/sh
# JenkinsStart.sh
# scripts
#
# Created by Vineet Choudhary on 26/05/17.
# Copyright © 2017 Vineet Choudhary. All rights reserved.
echo -n "Jenkins CI Server"
echo -n "Cleaning Jenking CI Server"
@vineetchoudhary
vineetchoudhary / clear-cache.m
Created Feb 1, 2017
Clear cache objective-c
View clear-cache.m
+ (void)removeAllStoredCredentials{
// Delete any cached URLrequests!
NSURLCache *sharedCache = [NSURLCache sharedURLCache];
[sharedCache removeAllCachedResponses];
// Also delete all stored cookies!
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSArray *cookies = [cookieStorage cookies];
id cookie;
for (cookie in cookies) {
@vineetchoudhary
vineetchoudhary / pgyer.md
Last active May 25, 2017
Download .ipa file from pgyer.com
@vineetchoudhary
vineetchoudhary / Symbolicate MacOSX Crash.sh
Created Dec 23, 2016
Symbolicate a crash report of a Mac OS X app
View Symbolicate MacOSX Crash.sh
#Ref http://stackoverflow.com/a/18354072/317461
#Put your release build and your .dSYM file in the same directory and open terminal
$cd directory
$lldb MyApp.app
(lldb) image lookup -v --address 0x00085f3c
@vineetchoudhary
vineetchoudhary / pemfilescript.sh
Last active Dec 22, 2016
Generate pem file for APNS
View pemfilescript.sh
#Get the p12 file, it needs to be converted to the PEM format by executing this command from the terminal:
openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
#If you want to create pem file without passphase, use -nodes
openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12 -nodes
#If you wish to remove the passphrase, either do not set one when exporting/converting or execute:
openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@vineetchoudhary
vineetchoudhary / latestrelease.js
Created Dec 22, 2016
Get latest release download
View latestrelease.js
<script type="text/javascript">
$(document).ready(function () {
GetLatestReleaseInfo();
});
function GetLatestReleaseInfo() {
$.getJSON("https://api.github.com/repos/ShareX/ShareX/releases/latest").done(function (release) {
var asset = release.assets[0];
var downloadCount = 0;
for (var i = 0; i < release.assets.length; i++) {
View win-store-api-call.cs
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace TestAnalyticsAPI