Skip to content

Instantly share code, notes, and snippets.

@paigeshin
paigeshin / FileUpload.js
Created September 8, 2021 03:24 — forked from nyx-code/FileUpload.js
This NodeJS API which will upload files onto the AWS S3 Bucket. Video -> https://youtu.be/TtuCCfren_I
require('dotenv/config')
const express = require('express')
const multer = require('multer')
const AWS = require('aws-sdk')
const uuid = require('uuid/v4')
const app = express()
const port = 3000
import SwiftUI
import HealthKit
struct ContentView: View {
@State var labelText = "Get Data"
@State var flag = false
let healthStore = HKHealthStore()
let allTypes = Set([
HKSeriesType.heartbeat(),
{
"status": 0,
"environment": "Sandbox",
"receipt": {
"receipt_type": "ProductionSandbox",
"adam_id": 0,
"app_item_id": 0,
"bundle_id": "com.apphud.subscriptionstest",
"application_version": "1",
"download_id": 0,
lazy var receiptRepository: ReceiptRepository = {
// you can here also set interceptor
var session = Session(interceptor: RetryRequestInterceptor())
let receiptProvider = MoyaProvider<ReceiptProvider>(session: session, plugins: [NetworkLoggerPlugin()])
let receiptRemoteDataSource = ReceiptRemoteDataSourceImpl(receiptProvider: receiptProvider)
let receiptLocalDataSource = ReceiptLocalDataSourceImpl()
return ReceiptRepositoryImpl(receiptLocalDataSource: receiptLocalDataSource, receiptRemoteDataSource: receiptRemoteDataSource)
}()
```bash
heroku git:remote -a paigeshin-portfolio
``
Analytics.logEvent("share_image", parameters: [
  "name": name as NSObject,
  "full_text": text as NSObject,
])
@paigeshin
paigeshin / git-aliases.md
Created January 9, 2022 15:10 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
class AutoSizingUiTableView : UITableView
{
override func intrinsicContentSize() -> CGSize
{
let requiredHeight = rowCount * rowHeight
return CGSize(width: UIView.noIntrinsicMetric, height: CGFloat(requiredHeight))
}
}
UIDevice.current.identifierForVendor!.uuidString
@paigeshin
paigeshin / firebasetoken.swift
Last active January 13, 2022 12:56
get firebase token
InstanceID.instanceID().token()