Skip to content

Instantly share code, notes, and snippets.

View ikazoy's full-sized avatar
😇

Yoshiki Ozaki ikazoy

😇
View GitHub Profile
@ecin
ecin / phantomjs_facebook.js
Created April 23, 2012 21:06
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@afternoon
afternoon / elb-sg-config.yaml
Created April 14, 2013 20:34
Security group and load balancer config file for Elastic Beanstalk. See http://tmblr.co/ZU9VxvibvDWI.
# vim: ft=yaml
# Elastic Load Balancer and Security Group configuration for the app
#
# - Allow anyone to connect to port 443 and office traffic to connect to
# port 22
# - Ensure all traffic is encrypted by configuring load balancer to listen on
# 443 and direct traffic to port 443 on app servers
# - Enable cookie-based session stickiness
# - Use /status for health check
# - Enable backend authentication policy by providing public key for cert
@sunaot
sunaot / if.md
Last active October 2, 2019 15:15
条件分岐とのつきあい方

条件分岐とのつきあい方

プログラムが複雑になる一番の理由は条件分岐 (if 文など) です。

条件分岐がなければ、一本道で読み下していけばいいのでバグが入り込む余地は大変少なくなります。

ということで、

  • 条件分岐を書かなくていいように書く
  • 条件分岐を書くなら、わかりやすく局所化して書く
@mo-ya
mo-ya / ec2-ssh
Last active February 14, 2017 23:58 — forked from migrs/ec2-ssh
#!/bin/sh
## EC2 automation login tool
#
# Original: http://m.igrs.jp/blog/2013/03/14/ec2-ssh/
# https://gist.github.com/migrs/5157665
# https://gist.github.com/MichinobuMaeda/5545875
#
# Changed by mo-ya (2013-07-06)
#
@sheharyarn
sheharyarn / request.js
Last active August 24, 2023 14:55
Axios Request Wrapper for React (https://to.shyr.io/axios-requests)
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@brianjlandau
brianjlandau / .babelrc
Last active March 29, 2018 07:41
Rails 5.1 webpacker config for react + jest + enzyme
{
"presets": [
[
"env",
{
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
AWSTemplateFormatVersion: "2010-09-09"
Description: >
Launch a static website backed by an S3 bucket and served via https through cloudfront.
Assumes you have the following available already
* An address in mind (e.g. blog.example.com)
* An existing Route53 Hosted Zone for the domain
* A validated AWS ACM certificate arn for the desired web address which must be in eu-west-1
Parameters:
HostedZoneID:
Description: >