Skip to content

Instantly share code, notes, and snippets.

Amit Pal amixpal

Block or report user

Report or block amixpal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ca56fe029adb1e4d4826388a6a5f64c6
List<Object> paymentMethodTypes = new ArrayList<>();
Map<String, Object> params = new HashMap<>();
params.put("amount", transferredAmount);
params.put("currency", "usd");
params.put("application_fee_amount", chargedBalance);
params.put("payment_method", "asasasasasas");
Map<String, Object> transferDataParams = new HashMap<String, Object>();
transferDataParams.put("destination", accountId);
View gist:3092fe178685e06d7d4cb89541745931
PaymentMethodCreateParams paymentMethodParams = PaymentMethodCreateParams
.create(card, billingDetails);
ConfirmSetupIntentParams confirmParams = ConfirmSetupIntentParams
.create(paymentMethodParams, pref.stripeApiKey().get());
mStripe.confirmSetupIntent(AddNewCardActivity.this, confirmParams);
View fitme-jr29g
apiVersion: v1
kind: Service
metadata:
creationTimestamp: "2019-12-02T11:18:55Z"
generateName: fitme-
labels:
app: fitme
name: fitme-jr29g
namespace: default
resourceVersion: "486673"
View pdfViewController
//
// PdfViewController.swift
// Fitme
//
// Created by paly on 9/9/19.
// Copyright © 2019 Paly. All rights reserved.
//
import UIKit
import PDFKit
View description
ame: mojo
Roles: master
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/arch=amd64
kubernetes.io/hostname=mojo
kubernetes.io/os=linux
node-role.kubernetes.io/master=
Annotations: kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
node.alpha.kubernetes.io/ttl: 0
View gist:c1de11e66c59c59c1ac4f4e985c0b492
NetworkManager.makeRequest(HttpRouter.createNewNutritionProgram(name: programName, interestList: interestList, description: textView.text, trainerId: userId!, addedByTrainer: true, programPrice: price.removeFormatAmount(), programType: typeOfProgram, isPromoCode: isPromoCode, promoId: promoCodeId, previewPdfUrl: previewPdfUrl, pdfUrl: fullPdfUrl, trainingVideos: self.trainingVideos, isVideo: self.isVideos), message: processingBar.PROCESSING_MESSAGE, showProgress: true)
.onSuccess { (response: FitMeResponse) in
let rootViewController = MainTabBarViewController()
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
appDelegate.window?.rootViewController = rootViewController
rootViewController.selectedIndex = 1
}
}
.onFailure { error in
print(error.localizedDescription)
View orignal
@IBDesignable
class RoundedView: UIView {
@IBInspectable
var topCornersRounded: Bool = false {
didSet {
if self.topCornersRounded {
layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner]
}
}
}
View round corner
@IBDesignable
class RoundedView: UIView {
@IBInspectable
var topCornersRounded: Bool = false {
didSet {
if self.topCornersRounded {
layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner]
}
}
}
View gist:d0ec94ccd8c20d0fd9a31a80e7ed4351
//
// DashboardViewController.swift
// Client
//
// Created by Heeral on 7/9/19.
// Copyright © 2019 heeral. All rights reserved.
//
import Foundation
import UIKit
View addpayment
func createCard(token: STPToken) {
if let customerId = UserDefaults.standard.value(forKey: ApiParametersConstant.STRIPE_CUSTOMER_ID) {
let attributes = RappleActivityIndicatorView.attribute(style: RappleStyle.apple)
RappleActivityIndicatorView.startAnimatingWithLabel("Fetching card details...", attributes: attributes)
CardManager.sharedInstance.createCard(customerId: customerId as! String, token: token.tokenId) { (success, response) in
DispatchQueue.main.async() {
RappleActivityIndicatorView.stopAnimation()
}
if (success) {
self.skipButton.setTitle("Done", for: .normal)
You can’t perform that action at this time.