Updated: 20240917
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ScrollableView<Content: View>: UIViewControllerRepresentable, Equatable { | |
// MARK: - Coordinator | |
final class Coordinator: NSObject, UIScrollViewDelegate { | |
// MARK: - Properties | |
private let scrollView: UIScrollView | |
var offset: Binding<CGPoint> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Platform, StyleSheet, Text, View } from 'react-native'; | |
import OrgChart from './Orgchart'; | |
import NodeComponent from './NodeComponent'; | |
const instructions = Platform.select({ | |
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', | |
android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// PaginatedScrollView | |
// | |
// Created by Aleksey Ozerov on 24.10.2019. | |
// Copyright © 2019 Aleksey Ozerov. All rights reserved. | |
// | |
import SwiftUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Binding { | |
/// Wrapper to listen to didSet of Binding | |
func didSet(_ didSet: @escaping ((newValue: Value, oldValue: Value)) -> Void) -> Binding<Value> { | |
return .init(get: { self.wrappedValue }, set: { newValue in | |
let oldValue = self.wrappedValue | |
self.wrappedValue = newValue | |
didSet((newValue, oldValue)) | |
}) | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"exceptionLogging": "STACKDRIVER", | |
"dataStudio": { | |
"name": "MongoDB via mlab API - acc40", | |
"company": "Account 4.0", | |
"companyUrl": "https://acc40.com", | |
"logoUrl": "https://next-scraft.appspot.com/images/scraft.ico", | |
"addonUrl": "https://medium.com/@jsat66/mongodb-connector-for-google-data-studio-part-1-%E0%B8%AA%E0%B8%B3%E0%B8%A3%E0%B8%A7%E0%B8%88-c35eac7f2bf4", | |
"supportUrl": "https://gist.github.com/jojosati/89652770b39fd147a2484e4baf13a5ee", | |
"description": "Universal MongoDB connector." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script embeds (and codesigns) a framework within an iOS app binary, but only when the configuration is Debug. | |
# It must be called from, or copied into an Xcode Run Script build phase with following setup: | |
# Input Files: | |
# - Path to framework within project folder (source path) | |
# - For example: $(SRCROOT)/ThirdPartyFrameworks/SimulatorStatusMagiciOS.framework | |
# Output Files: | |
# - Desired path to framework within ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH} (destination path) | |
# - For example: ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/SimulatorStatusMagiciOS.framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Busboy = require('busboy'); | |
var AWS = require('aws-sdk'); | |
var socket = require('socket.io'); | |
var express = require('express'); | |
var http = require('http'); | |
// Set up Express | |
var app = express(); | |
var server = http | |
.Server(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// | |
/// https://stackoverflow.com/a/29741007 | |
/// | |
let s = Struct() // Struct | |
withUnsafePointer(to: s) { | |
print(String(format: "%p", $0) | |
} | |
/// | |
/// http://stackoverflow.com/a/36539213/226791 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UserInfoCell.swift | |
// | |
// Created by Mathias Claassen on 30/8/16. | |
// Copyright © 2016 Xmartlabs. All rights reserved. | |
// | |
import Foundation | |
import Eureka |
NewerOlder