Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import argparse
import time
from CO2Meter import *
parser = argparse.ArgumentParser()
parser.add_argument("--local", default="___")
parser.add_argument("--path")
args = parser.parse_args()
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
package main
import(
"fmt"
"reflect"
)
func main() {
var hp, cp, wp, crp Printer
hp = NewHelloPrinter()
@tanatana
tanatana / kansou.js
Created October 21, 2014 04:50
感想書き放題
javascript:(function(){
var editorBaseURL = "http://blog.hatena.ne.jp/my/edit?";
var title = document.getElementsByClassName('entry-title-link')[0].textContent;
var entryURL = document.getElementsByClassName('entry-title-link')[0].href;
location.href = editorBaseURL + "title=" + encodeURIComponent(title + "の感想") + "&;body=" + encodeURIComponent("[" + entryURL + ":embed]\n[" + entryURL + ":title]");
})()
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>canvas problem with iOS7.1 on HDPI device</title>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@tanatana
tanatana / test.html
Created September 8, 2014 12:52
jQueryの.each()のやつ
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>$.each()のやつ</title>
</head>
<body>
/*
* jQuery hasScrollBar plugin ver 0.0.1
* Copyright (c) 2014 tanatana (a.k.a @side_tana)
* This source file is subject to the MIT license.
*/
(function($) {
$.fn.hasScrollBarY = function(options){
var innerWidth = this.innerWidth();
var clientWidth = this[0].clientWidth;
@tanatana
tanatana / gist:7749176
Last active December 30, 2015 00:19
im.kayac.com を Ruby からつかう
require 'openssl'
require 'net/http'
require 'uri'
IM_KAYAC_SECRET = "YOUR SECRET KEY"
IM_KAYAC_USER_ID = "YOUR USER ID"
def sendMessage(msg)
sha1builder = OpenSSL::Digest.new('sha1')
Net::HTTP.post_form(URI.parse("http://im.kayac.com/api/post/#{IM_KAYAC_USER_ID}"),
@tanatana
tanatana / _.md
Created November 6, 2013 00:36
circle-animation
@tanatana
tanatana / leopalace21.md
Last active April 16, 2017 01:01
マンスリーマンションを使う際に持ち込んだ方がいいもの・持ち込まなくて良いもの

持ち込んだ方が良いもの

100円ショップで買えるものなら多分現地調達の方が荷物減らせて便利

  • トイレットペーパー
  • ティッシュ
  • コップ
    • 歯磨きとか部屋で飲み物飲んだり.紙コップでもいいけど歯磨くたびに紙コップはちょっともったいない.100円ショップで買えるヤツを1ヶ月なりつかって捨てれば良い.
  • 皿,割り箸
  • 割り箸はあると良い.皿は自炊するなら.ただ自炊するとなるとひつようなものが増える.洗剤とかスポンジとか.検討した方が良い.今回はとりあえず自炊しない前提で進める.