iOS Launch Screen
Steps taken to unofficially localize:
- Create a new
InfoPlist.strings
file - Add the following line to that file:
UILaunchStoryboardName = "LaunchScreen";
import SwiftUI | |
import PanModal | |
struct ExampleView: View { | |
@State var detail: AnyView? = nil | |
@State var items: [String] = ["Detail 1", "Detail 2", "Detail 3"] | |
var body: some View { | |
NavigationView { |
InfoPlist.strings
fileUILaunchStoryboardName = "LaunchScreen";
// https://stackoverflow.com/questions/56716311/how-to-show-complete-list-when-keyboard-is-showing-up-in-swiftui?noredirect=1&lq=1 | |
import SwiftUI | |
import Combine | |
struct AdaptToKeyboard: ViewModifier { | |
@State var currentHeight: CGFloat = 0 | |
func body(content: Content) -> some View { |
import UIKit | |
import SwiftUI | |
import PlaygroundSupport | |
// CustomParentView is a custom UIKit view. Its Coordinator can be used | |
// to manage delegates if needed (e.g. UIContextMenuInteractionDelegate). | |
struct CustomParentView<Content: View>: UIViewRepresentable { | |
let content: UIView | |
// Based on the SuperMemo 2 Algorithm: | |
// https://www.supermemo.com/english/ol/sm2.htm | |
import UIKit | |
struct Item { | |
let id: UUID | |
let prompt: String | |
let explaination: String | |
var score: Score |
let task = URLSession.shared.dataTask(with: req) { (data, response, error) in | |
... | |
} | |
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(4)) { | |
task.resume() | |
} |
*** Cluster Setup for Google Container Engine *** | |
0/ Install and configure local gcloud and kubectl: https://cloud.google.com/sdk/docs/ | |
> gcloud components install kubectl | |
1/ Configure Google Cloud account: | |
> gcloud config set account YOUR_EMAIL_ADDRESS | |
> gcloud config set project YOUR_PROJECT_ID | |
> gcloud config set compute/zone us-west1-a | |
> gcloud config set container/cluster example |
var jwt = require("jsonwebtoken") | |
var http2 = require("http2") | |
const ALGORITHM = "ES256" | |
const APNS_KEY_ID = "YOUR_APNS_KEY_ID" | |
const TEAM_ID = "YOUR_TEAM_ID" | |
const BUNDLE_ID = "YOUR_BUNDLE_ID" | |
const REGISTRATION_ID = "YOUR_DEVICE_PUSH_TOKEN" | |
const CERT = |
const IncomingWebhook = require("@slack/client").IncomingWebhook | |
const SLACK_WEBHOOK_URL = "SLACK_WEBHOOK_URL" | |
const webhook = new IncomingWebhook(SLACK_WEBHOOK_URL) | |
// subscribe is the main function called by Cloud Functions. | |
module.exports.slackSubscribe = (event, callback) => { | |
const build = eventToBuild(event.data.data) | |
// Skip if the current status is not in the status list. |
package ledger | |
import ( | |
"encoding/json" | |
"time" | |
"github.com/jmoiron/sqlx" | |
"github.com/jmoiron/sqlx/types" | |
uuid "github.com/satori/go.uuid" | |
) |