Skip to content

Instantly share code, notes, and snippets.

View 328's full-sized avatar

328 328

View GitHub Profile
@328
328 / lambda-ruby-selenium-activerecord.rb
Last active September 13, 2020 13:39
lambda-ruby-selenium-activerecord
require "active_record"
require "selenium-webdriver"
ActiveRecord::Base.establish_connection(
adapter: "mysql2",
host: ENV["DB_HOST"],
username: ENV["DB_USER"],
password: ENV["DB_PASSWORD"],
database: ENV["DB_NAME"]
)
@328
328 / serverless.yaml
Created March 31, 2019 12:41
alexaSkillをトリガーにLambdaを実行させる
service: subscribe-event-lambda
provider:
name: aws
runtime: nodejs8.10
memorySize: 128
timeout: 60
stage: dev
versionFunctions: 1
region: ap-northeast-1
@328
328 / wp-docker-compose.yml
Created February 9, 2019 10:46
wordpressテスト用のdocker-compose
version: '2'
services:
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
@328
328 / 303.php
Created January 27, 2019 16:24
303テスト用
<?php
http_response_code(303);
header('Location: http://example.com');
?>
@328
328 / 307.php
Created January 27, 2019 15:08
307 redirect のテスト用コード
<?php
http_response_code(307);
header('Location: http://example.com/');
?>
@328
328 / ViewController.swift
Created April 5, 2018 06:06
SFSafariViewControllerのテスト
import UIKit
import SafariServices
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@328
328 / ViewController.swift
Created April 5, 2018 06:02
Safariへのリダイレクト
import UIKit
class ViewController: UIViewController , UIWebViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()
// URLを指定
let url = URL(string: "http://localhost:8080/refrects")!
@328
328 / ViewController.swift
Created April 5, 2018 05:59
WKWebView テスト
import UIKit
import WebKit
class ViewController: UIViewController {
let wkWebView = WKWebView()
var backButton: UIButton!
var forwadButton: UIButton!
var targetUrl = "http://localhost:8080/refrects"
@328
328 / ViewController.swift
Created April 5, 2018 05:50
UIWebViewテスト
import UIKit
class ViewController: UIViewController {
var webView = UIWebView()
override func loadView() {
view = webView
}
override func viewDidLoad() {