Skip to content

Instantly share code, notes, and snippets.

View iogi's full-sized avatar
:octocat:

Ippei Ogiwara iogi

:octocat:
View GitHub Profile
curl -v --silent --location --connect-to "reponame.example.jp::dxxxxxxxxxxxxx.cloudfront.net:" http://reponame.example.jp/ > /dev/null
* Connecting to hostname: dxxxxxxxxxxxxx.cloudfront.net
* Trying 13.32.230.25...
* TCP_NODELAY set
* Connected to dxxxxxxxxxxxxx.cloudfront.net (13.32.230.25) port 80 (#0)
> GET / HTTP/1.1
> Host: reponame.example.jp
> User-Agent: curl/7.54.0
> Accept: */*
>
const readline = require('readline');
const Mastodon = require('mastodon-api');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
let clientId;
let clientSecret;
var Promise = require('bluebird');
var Slack = require('slack-node');
var AWS = require('aws-sdk');
var moment = require('moment');
var _ = require('underscore');
var util = require('util');
var apiToken = "";
function getLastChecked() {
# -*- coding: utf-8 -*-
class DomainScore(object):
KEYMAP = [
'1234567890-',
'qwertyuiop',
'asdfghjkl',
'zxcvbnm,.'
]
def __init__(self):
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"sgadmin": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "ssh from office",
"VpcId": "vpc-xxxxxxxx",
"Tags": [{"Key": "Name", "Value": "admin"}],
"SecurityGroupIngress": [
#!/bin/sh
VPC_ID="vpc-xxxxxxxx"
# ELB
SGID=`aws ec2 create-security-group --group-name elb --description elb --vpc-id $VPC_ID --output text --query GroupId`
aws ec2 authorize-security-group-ingress --group-id $SGID --protocol tcp --port 80 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-id $SGID --protocol tcp --port 443 --cidr 0.0.0.0/0
import boto.ec2
VPC_ID = 'vpc-xxxxxxxx'
conn = boto.ec2.connect_to_region(
'ap-northeast-1',
aws_access_key_id='<access key>',
aws_secret_access_key='<secret access>')
sg_elb = conn.create_security_group('elb2', '80,443 from world', VPC_ID)
<?php
// Signature Version 4 Key Derivation Samples in PHP5
// http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html
function hash_sha256_raw($msg, $key)
{
return hash_hmac("sha256", $msg, $key, true);
}
function getSignature($key, $dateStamp, $regionName, $serviceName)
{
// ==UserScript==
// @name noreferrer
// @namespace http://ss-o.net/
// @include http://*
// ==/UserScript==
document.body.addEventListener('DOMNodeInserted',noref,false);
noref({target:document.body});
function noref(e){
diff -crN config.m4 config.m4.new
*** config.m4 2010-01-17 13:34:39.000000000 +0900
--- config.m4.new 2010-01-17 14:10:01.000000000 +0900
***************
*** 1,5 ****
dnl
! dnl $Id: config.m4 247692 2007-12-06 14:01:49Z helly $
dnl
dnl Suppose we need FlatFile if no support or only CDB is used.