Skip to content

Instantly share code, notes, and snippets.

View tanshio's full-sized avatar
🤢
😭

Shota Tanno tanshio

🤢
😭
View GitHub Profile
@tanshio
tanshio / recall.gs
Created January 1, 2019 14:33
Recall bot
var moment = Moment.load();
var domain = 'http://www.recall.go.jp';
function myFunction() {
var URL = "http://www.recall.go.jp/new/";
var html = UrlFetchApp.fetch(URL).getContentText();
var doc = Parser.data(html).from('<div id="wrapper">').to('</div><!--one_colum end-->').build();
var table = Parser.data(doc).from('<table id="importance_info">').to('</table>').build();
var list = Parser.data(table).from('<tr>').to('</tr>').iterate();
/**
* @name InfoBox
* @version 1.1.13 [March 19, 2014]
* @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google)
* @copyright Copyright 2010 Gary Little [gary at luxcentral.com]
* @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class.
* <p>
* An InfoBox behaves like a <tt>google.maps.InfoWindow</tt>, but it supports several
* additional properties for advanced styling. An InfoBox can also be used as a map label.
* <p>
@tanshio
tanshio / header.php
Last active June 27, 2017 16:04
その場で編集くん
<?php
// wp_headの前に追加
// wp_deregister_script('jquery') をしていると表示されないので注意
// 一応ログインしていないと表示しないようにする
if (current_user_can('editor') || current_user_can('administrator')) {
wp_enqueue_script( 'wp-api' );
}
?>
<?php wp_head(); ?>
<?php
/*
Template Name: リストページ
*/
?>
<?php get_header(); ?>
<h1>追加リスト</h1>
@tanshio
tanshio / search-page.php
Last active August 31, 2017 14:18
20170624
<?php
/*
Template Name: インクリメンタルサーチページ
*/
?>
<?php get_header(); ?>
<h1>インクリメンタルサーチ</h1>
@tanshio
tanshio / .vimrc
Last active August 17, 2017 16:52
.vimrc
" let $PYTHONHOME='/Users/tannoshota/.anyenv/envs/pyenv/versions/3.6.0'
" let $PYTHONHOME=$HOME."/.anyenv/envs/pyenv/versions/2.7.11"
" set pythondll=$HOME/.anyenv/envs/pyenv/versions/2.7.11/lib/libpython2.7.dylib
" py import sys
let $PYTHONHOME=$HOME."/.anyenv/envs/pyenv/versions/3.6.0"
set pythonthreedll=$HOME/.anyenv/envs/pyenv/versions/3.6.0/lib/libpython3.6m.dylib
py3 import sys
@tanshio
tanshio / Editor.js
Last active January 31, 2017 07:26
Rails API + Markdown
import React from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import marked from 'marked';
const postContent = (content,md)=>{
axios({
method: "patch",
url:`/api/v1/${window.MDconfig.url}/${window.MDconfig.id}`,
withCredentials: true,
@tanshio
tanshio / wave.js
Created January 2, 2017 17:20
wave
export default ()=>{
var c = document.getElementById("canvas");
var ctx = c.getContext("2d");
let _w = window.window.innerWidth
let _h = window.innerHeight
c.setAttribute('width',_w)
c.setAttribute('height',_h)
@tanshio
tanshio / index.html
Last active December 12, 2016 06:31
svg-vue
<!DOCTYPE html>
<html lang="ja" prefix="og:http://ogp.me/ns#">
<head>
<title>タイトル</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="keywords" content="キーワード">
@tanshio
tanshio / Gemfile
Last active October 11, 2016 05:39
Railsとvue.jsなどのJSフレームワークで、クロスドメイン通信(CORS)の設定をしたい! ref: http://qiita.com/tanshio/items/f35efa7321066d60fc62
group :development, :test do
gem 'rack-cors', :require => 'rack/cors'
end