View nginx.yaml
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
AWSTemplateFormatVersion: '2010-09-09' | |
Resources: | |
App: | |
Type: AWS::AppRunner::Service | |
Properties: | |
ServiceName: NGINX | |
SourceConfiguration: | |
ImageRepository: | |
ImageIdentifier: "public.ecr.aws/nginx/nginx:latest" | |
ImageConfiguration: |
View main.rs
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
use std::env::{args, args_os}; | |
use std::io; | |
use std::io::Read; | |
/// $ seq 1 4 | sliding | |
/// > 1 2 | |
/// > 2 3 | |
/// > 3 4 | |
fn main() -> Result<(), io::Error> { | |
let d = args().enumerate().find(|(_, x)| x == "-d").map_or_else( |
View Dockerfile
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
FROM amazonlinux:latest | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable | |
RUN yum install -y bzip2-devel gcc gcc-c++ git openssl-devel python27-devel python36-devel readline-devel sqlite-devel zip \ | |
&& yum clean all | |
WORKDIR /usr/src | |
RUN curl -L https://www.openssl.org/source/openssl-1.1.0f.tar.gz | tar xz && \ | |
cd openssl-1.1.0f && \ | |
./config -fPIC --prefix=/usr/local --openssldir=/usr/local/ssl && \ | |
make -j$(nproc) && \ |
View ChatWork-API.swagger.json
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
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "ChatWork API", | |
"version": "v2" | |
}, | |
"host": "api.chatwork.com", | |
"basePath": "/v2", | |
"schemes": [ | |
"https" |
View InnerProduct.pas
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
program Project1; | |
{$APPTYPE CONSOLE} | |
{$R *.res} | |
uses | |
System.SysUtils, | |
System.Generics.Collections, | |
System.Math; |
View pet-snippet.toml
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
[[snippets]] | |
description = "generate model from swagger" | |
command = "java -Dmodels -jar /usr/local/Cellar/swagger-codegen/2.2.2/libexec/swagger-codegen-cli.jar generate -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/yaml/uber.yaml -o ./ -l scala" |
View get_active_window.rs
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
extern crate winapi; | |
extern crate user32; | |
fn main() { | |
println!("{}", get_foreground_window_title()) | |
} | |
fn get_foreground_window_title() -> String { | |
use std::ffi::OsString; | |
use std::os::windows::ffi::OsStringExt; |
View main.rs
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
fn main() { | |
let sqrts = (2..100).map(|x| f64::from(x).sqrt()); | |
for num in sqrts.into_iter() { | |
println!("{}", num); | |
} | |
} |
View COMUtils.pas
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
unit COMUtils; | |
interface | |
uses | |
System.Classes, Winapi.ActiveX; | |
type | |
TCOMUseThread = class(TThread) | |
private |