Skip to content

Instantly share code, notes, and snippets.

View vinod1988's full-sized avatar
💭
OpenToWork

Vinod Vishwakarma vinod1988

💭
OpenToWork
  • Mumbai
View GitHub Profile
@vinod1988
vinod1988 / gist:826d11152af86f16f4b0096e8cdf871d
Last active February 22, 2021 11:49
Physical iPad Devices Width & Height
iPad
H=1024.0
W=768.0
iPad Air (4th Generation)
H=1180.0
W=820.0
iPad Mini (4th Generation)
import 'dart:math';
void main() {
loveCalculator();
}
void loveCalculator() {
@vinod1988
vinod1988 / p12_pem
Last active December 19, 2019 12:26
Create p12 to PEM for iOS Push Notification
Creating .pem file for APNS?
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
@vinod1988
vinod1988 / Android Privacy Policy Template
Created September 10, 2018 05:08 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@vinod1988
vinod1988 / PhpFireBaseNotificationSample.php
Created April 10, 2018 05:38 — forked from MohammadaliMirhamed/PhpFireBaseNotificationSample.php
Simple PHP FireBase (FCM) script showing how to send an Android push notification. Be sure to replace the SERVER_API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call http://sample.com/PhpFireBaseNotificationSample.php?id=THE_DEVICE_REGISTRATION_ID The main Code For GCM is https://gist.github.com/prime…
<?php
#API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = $_GET['id'];
#prep the bundle
$msg = array
(
'body' => 'Body Of Notification',
@vinod1988
vinod1988 / README.md
Created April 11, 2017 06:28 — forked from FokkeZB/README.md
URL schemes for iOS and Android (2/2)
@vinod1988
vinod1988 / Router.swift
Created December 28, 2016 11:22
Uploading a file with SWIFT via POST multipart/form-data (PHP)
import Foundation
import Alamofire
public enum Router:URLRequestConvertible {
public static let baseUrlString:String = "http://testapi.example.com"
case Upload(fieldName: String, fileName: String, mimeType: String, fileContents: NSData, boundaryConstant:String);
var method: Alamofire.Method {
switch self {
case Upload:
@vinod1988
vinod1988 / manifest.plist
Created December 10, 2015 11:51 — forked from palaniraja/manifest.plist
App Manifest file
<?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>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
@vinod1988
vinod1988 / build-index.html
Created December 10, 2015 11:51 — forked from palaniraja/build-index.html
Download build files
<!DOCTYPE html>
<html>
<head>
<title>My awesome app</title>
</head>
<body>
<h2>beta builds</h2>
<a href="itms-services://?action=download-manifest&amp;url=http://dl.dropbox.com/u/1001/manifest.plist">Awesome App v 0.0.16</a></body>
<h2>alpha builds</h2>
@vinod1988
vinod1988 / FileUploader.swift
Created November 20, 2015 16:53 — forked from ncerezo/FileUploader.swift
Alamofire multipart upload
//
// FileUploader.swift
//
// Copyright (c) 2015 Narciso Cerezo Jiménez. All rights reserved.
// Largely based on this stackoverflow question: http://stackoverflow.com/questions/26121827/uploading-file-with-parameters-using-alamofire/28467829//
import Foundation
import Alamofire
private struct FileUploadInfo {