Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>使い捨てパッド暗号化</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@hachibeeDI
hachibeeDI / rivo.coffee
Created February 16, 2015 14:10
リボの手数料の雑な算出
ammount = process.argv[2]
each = process.argv[3]
interest = if process.argv[4] == undefined then 15.0 else process.argv[4]
interest_each_month = (interest / 12) / 100
# console.log interest_each_month
# console.log ammount * interest_each_month
i = 0
ammount = ammount - each
@hachibeeDI
hachibeeDI / hatena_snsshare.html
Last active August 29, 2015 14:14
はてなブックマークの上部にシェアボタンを設置するhtml。bookmark_button.jsはすでに読み込まれているのでいらない。クラス名を`hatena-bookmark-button`にする。
<ul class="sns-share--area">
<li>
<a
href="http://b.hatena.ne.jp/entry/{Permalink}"
class="hatena-bookmark-button sns-share--bookmark sns-share--link"
data-hatena-bookmark-title="{Title}"
data-hatena-bookmark-layout="simple"
title="このエントリーをはてなブックマークに追加">
<i class="blogicon-bookmark lg"></i></a>
</li>
@hachibeeDI
hachibeeDI / header.html
Last active August 29, 2015 14:13
hatena theme Cinnamon custom header
<!--
例です。
デザイン設定 -> ヘッダ -> タイトル下 の中にこのHTMLを参考にしたコードを挿入するとグローバルヘッダが出てきます。
href=""の中にurl、その横に表示したい言葉を入れるようにしてください。
-->
<nav class="custom-header--navigation">
<ul class="custom-header">
<li class="custom-header__li"><a href="/">TOP</a></li>
<li class="custom-header__li"><a href="/archive/category/プログラミング">プログラミング</a></li>
<li class="custom-header__li"><a href="/archive/category/料理">料理</a></li>
@hachibeeDI
hachibeeDI / hatena_recommend_widget.coffee
Last active August 29, 2015 14:07
合わせて読みたいを設置するやつ。hatena_recommend_widget.htmlを記事の下に置こう。
###
The MIT License (MIT)
Copyright (c) <2014> <OGURA_Daiki>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@hachibeeDI
hachibeeDI / pinserter.py
Created September 24, 2014 08:29
Angular like ロケーター。DIとロケーターの違いよくわからん。
# -*- coding: utf-8 -*-
from __future__ import (print_function, division, absolute_import, unicode_literals, )
from inspect import getargspec
from functools import wraps
from operator import methodcaller
PREFIX_FOR_INJECT_ARGS = 'pij_'
@hachibeeDI
hachibeeDI / rx-demo.html
Last active August 29, 2015 14:06
rxjsのサンプル
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rxデモ</title>
<style>
.hidden {
display: none;
}
@hachibeeDI
hachibeeDI / simple.py
Created August 26, 2014 17:08
bubble
# -*- coding: utf-8 -*-
from __future__ import (print_function, division, absolute_import, unicode_literals, )
def bubble_sort(xs):
count = len(xs) - 1
def flip(ys):
for i in xrange(count):
first = ys[i]
# -*- coding: utf-8 -*-
from __future__ import (print_function, division, absolute_import, unicode_literals, )
from operator import methodcaller
class _Guard(object):
def __get__(self, owner, type=None):
self.owner = owner
return self
@hachibeeDI
hachibeeDI / martini+json.sample.go
Created July 8, 2014 06:12
martiniでjsonのサンプル
package main
import (
"github.com/codegangsta/martini"
"github.com/martini-contrib/render"
)
func main() {
m := martini.Classic()