This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
// 重力加速度のしきい値 | |
var GRAVITY_MIN = 9.8; | |
var GRAVITY_MAX = 12.00; | |
// 歩数 | |
var _step = 0; | |
// 現在歩いているかどうか | |
var _isStep = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Added by Zplugin's installer | |
source "$HOME/.zplugin/bin/zplugin.zsh" | |
autoload -Uz _zplugin | |
(( ${+_comps} )) && _comps[zplugin]=_zplugin | |
### End of Zplugin installer's chunk | |
zplugin load zsh-users/zsh-syntax-highlighting # 実行可能なコマンドに色付け | |
zplugin load zsh-users/zsh-completions # 補完 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ハマりポイント | |
apps scriptのソースコードを書き換えたらプロジェクトバージョンを新しくして更新する必要がある。 | |
メニュー > 公開 > ウェブアプリケーションとして導入 | |
「プロジェクトバージョン」をNewにして更新。 | |
アプリケーションにアクセスできるユーザー:全員(匿名含む) | |
*/ | |
function myFunction() { | |
var url = "https://docs.google.com/spreadsheets/d/xxxxxxxxxxxxx/edit?usp=sharing"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//力技ですが、URL一覧を取得する方法を考えてみました。 | |
//まず、このような自分が管理するプレイリストを編集する画面に移動する。 | |
// https://gyazo.com/5312815c46bcacd81dd0e1f4b05a1d41 | |
//動画数が100以上だと「もっと見る」とか押さないと隠れているかもしれないので、 | |
//同じ画面内に一度全部表示させてから、 | |
//ブラウザのコンソールを開いて下記のコードをコピペしてEnterすると画面の右下にURL一覧ができます。 | |
(function(){ | |
var ary = []; | |
document.querySelectorAll('.pl-video-title-link').forEach(function(e){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ヒラギノ角ゴ */ | |
font-family: "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif; | |
/* ヒラギノ明朝 */ | |
font-family: "ヒラギノ明朝 Pro", "Hiragino Mincho Pro", "MS P明朝", "MS PMincho", serif; | |
/* From: 游明朝体・游ゴシック体のCSSでの利用 - Qiita [キータ] | |
* http://qiita.com/shinnn/items/5be7e8106189311559c1 | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sans-serif { | |
font-family: "游ゴシック体", "Yu Gothic", YuGothic, sans-serif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url = Popup.input "amebloのURLを入力してください" | |
#todo: amebloアプリからsafariで開いた際に余計なパラメータが付くことがありyqlで失敗する。パラメータを除去する | |
url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'" + url + "'%20and%20xpath%3D'%2F%2Fimg%5Bcontains(%40src%2C%20%22http%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F%22)%5D%5Bnot(contains(%40src%2C%20%22%3Fcpd%3D%22))%5D'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | |
json = Browser.json url | |
#p json | |
imgs = json['query']['results']['img'] | |
imgs.each do |e| | |
src = e['src'] | |
if src =~ /\?caw=/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#line_like_chatbot v0.1 | |
class Chat | |
def initialize | |
feed = "http://lineblog.me/ebichu/index.rdf" | |
count = 10 | |
url = "https://query.yahooapis.com/v1/public/yql?q=SELECT%20title%2Clink%2Cencoded%20FROM%20rss%20WHERE%20url%3D%22" + URI.encode_www_form_component(feed) + "%22%20%7C%20truncate(count%3D" + count.to_s + ")&format=json" | |
data = Browser.json url | |
@menu = [] | |
@text = [] | |
data['query']['results']['item'].each_with_index {|item,i| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main | |
p = [] | |
x = Popup.input "入力した数の中から素数を探します" | |
x = x.to_i | |
s = [*2..x] | |
while (1) | |
t = s.shift | |
p << t | |
s.select! {|e| e % t != 0 } | |
break if (x**0.5) <= t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main | |
url = Popup.input "amebloのURLを入力してください" | |
url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'" + url + "'%20and%20xpath%3D'%2F%2Fimg%5Bcontains(%40src%2C%20%22http%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F%22)%5D%5Bnot(contains(%40src%2C%20%22%3Fcpd%3D%22))%5D'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | |
json = Browser.json url | |
p json | |
end |
NewerOlder