Skip to content

Instantly share code, notes, and snippets.

View akiyoshi83's full-sized avatar

akiyoshi akiyoshi83

  • Individual
  • Tokyo
View GitHub Profile
@akiyoshi83
akiyoshi83 / outline.json
Last active March 25, 2016 10:46
CloudFormation Snipets
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "",
"Parameters" : {
},
"Resources" : {
},
@akiyoshi83
akiyoshi83 / index.html
Created October 12, 2015 04:54
Try Mithril
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>try mithril</title>
<style type="text/css" media="screen">
#header {
height: 80px;
width: 100%;
}
@akiyoshi83
akiyoshi83 / myelb.sh
Last active August 29, 2015 14:19
ELB register / deregister from ec2
#!/bin/bash
command=$1
elb_name=$2
id=`curl http://169.254.169.254/latest/meta-data/instance-id 2>/dev/null`
if [ -z $id ]; then
exit 1
fi
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- db/schema.rb
- tmp/**/*
- .bundle/**/*
- bin/*
- config/initializers/*.rb
@akiyoshi83
akiyoshi83 / replaceDomain.js
Created March 6, 2015 01:40
replace domain in html
// 絶対URLのドメインを書き換える(未完)
// 変換対象の属性
// [action],[background],[src],[href]
// その他URIが入りうる属性
// [cite],[classid],[data],[longdesc],[profile],[usemap]
function replaceDomain(newDomain) {
var uriAttrs = "[action],[background],[src],[href]";
var list = uriAttrs.split(',').map(function(item) {
return item.substring(1, item.length-1);
});
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
@akiyoshi83
akiyoshi83 / overlaymenu.js
Created March 6, 2015 01:37
Android2系でも動く?簡単なオーバーレイメニューの実装
(function(global) {
/**
* overlay menu
*/
function overlayMenu($menu, $open, $close) {
var $inner = $menu.find('.inner');
var $body = $('body');
function open(ev) {
@akiyoshi83
akiyoshi83 / index.html
Created March 6, 2015 01:35
context menu jquery plugin.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jquery-context-menu demo</title>
<style>
.boxes {
overflow: hidden;
}
.box {
; hello-os
ORG 0x7c00 ; このプログラムがどこに読み込まれるのか
; 以下は標準的なFAT12フォーマットフロッピーディスクのための記述
JMP SHORT entry
DB 0x90
DB "HELLOIPL" ; ブートセクタの名前を自由に書いてよい(8バイト)
DW 512 ; 1セクタの大きさ(512にしなければいけない)
DB 1 ; クラスタの大きさ(1セクタにしなければいけない)
@akiyoshi83
akiyoshi83 / .vimrc
Created October 16, 2014 07:35
最小限の.vimrc
set nocompatible
set number
set showmode
set ruler
set showcmd
set showmatch
set laststatus=2
set statusline=[%{&fileencoding}][\%{&fileformat}]\ %F%m%r%=<%c:%l>
syntax on