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 | |
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 { |
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
// | |
// BottomSheetView.swift | |
// | |
// Created by Majid Jabrayilov | |
// Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
// | |
import SwiftUI | |
fileprivate enum Constants { | |
static let radius: CGFloat = 16 |
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/bash | |
# Copyright © 2017 Google Inc. | |
# 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 |
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
#! /usr/bin/env python | |
''' | |
greenscreen.py: Greenscreen effect without a physical green screen | |
This performs background subtraction, and sets the background to "green" for use with "key frame" video editing software | |
Author: Scott Hawley, https://github.com/drscotthawley | |
Requirements: | |
Python, NumPy and OpenCV | |
I got these via Macports, but Homebrew, etc. work. |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>AES client/server test</title> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css"> | |
<style> | |
body { font-size: 80%; padding: 1em; } | |
form { margin-top: 2em; } | |
label { display: inline-block; width: 6em; } |
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
// | |
// MTKCIImageView.swift | |
// Fil | |
// | |
// Created by Muukii on 9/27/15. | |
// Copyright © 2015 muukii. All rights reserved. | |
// | |
import Foundation | |
import Metal |
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 Foundation | |
import CryptoSwift | |
extension String { | |
func aesEncrypt(key: String, iv: String) throws -> String{ | |
let data = self.dataUsingEncoding(NSUTF8StringEncoding) | |
let enc = try AES(key: key, iv: iv, blockMode:.CBC).encrypt(data!.arrayOfBytes(), padding: PKCS7()) | |
let encData = NSData(bytes: enc, length: Int(enc.count)) | |
let base64String: String = encData.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0)); |
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 Foundation | |
import UIKit | |
extension UIColor { | |
convenience init(hexString:String) { | |
let hexString:NSString = hexString.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) | |
let scanner = NSScanner(string: hexString) | |
if (hexString.hasPrefix("#")) { | |
scanner.scanLocation = 1 |
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/bash | |
if [[ -z "$1" ]]; | |
then | |
echo "No SVG file specified. Exiting." | |
exit -1 | |
fi | |
ispng=$(file $1) | |
echo $ispng | grep -q SVG |
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/bash | |
: << '#__REM__' | |
指定さたライブラリをAndroid用にフルオートで作成します。ダウンロード、toolchainsの作成、複数のアーキテクチャのビルドも自動的に行います。デフォルトではarmv5te、armv7-a、mips1、i386のアーキテクチャを作成します。 | |
Create a full-auto for Android the library specified. Creating download, toolchains, build the architecture of multiple automatically. Create architecture, mips1, i386 armv5te, armv7-a by default. | |
#__REM__ | |
TARGET_VERSION="1.3.1" |
NewerOlder