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:

iCal Geek Talk, turn away now, don't do this, it's the geek way hushed whisper about iCal.

my BS ver 1.0

the problem

  • I use iphone calendar and sync calendar to Snow Leopard, long live the beast!

  • No Google calendar.

#import <QuartzCore/QuartzCore.h>
@interface ArrowLayer : CALayer
@property (nonatomic) CGFloat thickness;
@property (nonatomic) CGFloat startRadians;
@property (nonatomic) CGFloat lengthRadians;
@property (nonatomic) CGFloat headLengthRadians;
@property (nonatomic, strong) UIColor *fillColor;
/*
* Copyright (C) 2010 Neil Davies
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software