This file contains hidden or 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 | |
# shellcheck shell=dash | |
# This is just a little script that can be downloaded from the internet to | |
# install rustup. It just does platform detection, downloads the installer | |
# and runs it. | |
# It runs on Unix shells like {a,ba,da,k,z}sh. It uses the common `local` | |
# extension. Note: Most shells limit `local` to 1 var per line, contra bash. |
This file contains hidden or 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
mkdir -p ~/.ssh | |
echo $GP_AWS_SSH_KEY_RSA | base64 -d > ~/.ssh/id_rsa | |
echo $GP_AWS_SSH_KEY_RSA_PUB | base64 -d > ~/.ssh/id_rsa.pub | |
echo -e "\n\ | |
Host git-codecommit.*.amazonaws.com\n\ | |
User $GP_AWS_SSH_KEY_ID\n\ | |
IdentityFile ~/.ssh/id_rsa\n\ | |
" > ~/.ssh/config | |
chmod 0600 ~/.ssh/id_rsa | |
chmod 0600 ~/.ssh/id_rsa.pub |
This file contains hidden or 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
aws codecommit create-repository \ | |
--repository-name :リポジトリ名 \ | |
--repository-description ":リポジトリの説明" |
This file contains hidden or 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
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
RUN unzip awscliv2.zip | |
RUN sudo ./aws/install |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"github.com/moaible/goptional" // yet not repository | |
) | |
func main() { | |
var baseValue = 1 | |
var var1 *int = nil |
This file contains hidden or 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 Amplify | |
import Hydra | |
enum RequestOperation<M: Model> { | |
case create(_ model: M) | |
case update(_ model: M, where: QueryPredicate? = nil) | |
case delete(_ model: M, where: QueryPredicate? = nil) | |
} |
This file contains hidden or 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 { API, Logger } from 'aws-amplify'; | |
// NOTE: もしAmplify関連で問題を調査したい場合 'DEBUG' にすると細かい挙動が確認できます | |
Logger.LOG_LEVEL = 'WARN'; | |
export type Headers = object | undefined; // TODO: 適切な型にする | |
export type QueryParams = object | undefined; // TODO: 適切な型にする | |
export type Body = object | undefined; // TODO: 適切な型にする | |
export interface ApiRequest { |
This file contains hidden or 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 | |
extension Array { | |
public func chunked(into size: Int) -> [[Element]] { | |
guard size > 0 else { | |
fatalError("Chunk size must not be zero") | |
} | |
return stride(from: 0, to: count, by: size).map { | |
Array(self[$0 ..< Swift.min($0 + size, count)]) |
This file contains hidden or 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 UIKit | |
class ButtonViewController: UIViewController { | |
var tapAction: (() -> Void)? | |
private lazy var button: UIButton = { | |
let v = UIButton.init(frame: .init(x: 0, y: 0, width: 60, height: 60)) | |
v.backgroundColor = .orange | |
v.addTarget(self, action: #selector(didTapAction), for: .touchUpInside) | |
return v | |
}() |
This file contains hidden or 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 RxSwift | |
import RxCocoa | |
/// スクロール対象 | |
public class ScrollContent { | |
// MARK: - Property | |
// MARK: Content info |
NewerOlder