Skip to content

Instantly share code, notes, and snippets.

View TheAlphamerc's full-sized avatar
:electron:
React | Next | Node | Flutter | Xamarin

Sonu Sharma TheAlphamerc

:electron:
React | Next | Node | Flutter | Xamarin
View GitHub Profile
@TheAlphamerc
TheAlphamerc / CreditCardModel.cs
Created March 7, 2019 04:26
Stripe payment gateway In xamarin forms
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Nonco.Model.PaymentGatway
{
public class CreditCardModel
{
[JsonProperty("exp_month")]
@TheAlphamerc
TheAlphamerc / AppPaymentService.cs
Last active July 10, 2024 19:02
Phonepay and Bhim app payment in xamarin form
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Util;
using Android.Views;
@TheAlphamerc
TheAlphamerc / AndroidManifest.xml
Last active April 13, 2019 12:21
Save and open file in xamain android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.10" package="in.nonco.nocancer" android:installLocation="preferExternal" android:versionCode="10">
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="26" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="NONCO" android:icon="@mipmap/ic_launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@TheAlphamerc
TheAlphamerc / BuyWithGoogle.cs
Created December 10, 2018 10:49
Xamarin android activity to purchase or bye things by google wallet
using System.Threading.Tasks;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Gms.Common;
using Android.Gms.Common.Apis;
using Android.Gms.Wallet;
using Android.Gms.Wallet.Fragment;
using Android.OS;
using Android.Support.V7.App;
@TheAlphamerc
TheAlphamerc / DeleteBinObj.txt
Last active October 10, 2018 11:30
Power shell command to delete bin ,obj folder from active directory
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
@TheAlphamerc
TheAlphamerc / Log.cs
Created October 4, 2018 12:00
This file is used in debugging to diagnose the logs
using System;
namespace App
{
public enum LogLevel
{
Debug = 0,
Info = 1,
Warn = 2,
Error = 3
}
@TheAlphamerc
TheAlphamerc / OnPlateForm.cs
Created September 20, 2018 11:58
This class helps in xamarin form to write plateform specific code
namespace Helpers
{
public sealed class OnCustomPlatform<T>
{
public OnCustomPlatform()
{
Android = default(T);
iOS = default(T);
WinPhone = default(T);
Windows = default(T);
@TheAlphamerc
TheAlphamerc / The Technical Interview Cheat Sheet.md
Last active September 20, 2018 06:20 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@TheAlphamerc
TheAlphamerc / embedded-file-viewer.md
Created September 20, 2018 06:13 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@TheAlphamerc
TheAlphamerc / AutoCapitalization.xaml
Created September 18, 2018 09:26
Sometimes you don’t want the mobile keyboard to capitalize the user’s entry. For example, when entering a username or email address. You can now control capitalization via an additional keyboard flag. Done via XAML it looks like this:
<Entry Placeholder="Enter your text" HeightRequest="40">
<Entry.Keyboard>
<Keyboard x:FactoryMethod="Create">
<x:Arguments>
<KeyboardFlags>CapitalizeNone</KeyboardFlags>
</x:Arguments>
</Keyboard>
</Entry.Keyboard>
</Entry>