Skip to content

Instantly share code, notes, and snippets.

Avatar

alt9800

View GitHub Profile
@skanae
skanae / tabima-jan
Last active Oct 7, 2021
旅麻雀用 西に100km地点を教えてくれる
View tabima-jan
from geopy.distance import geodesic
import math
# (緯度, 経度)
KyotoStation = (34.98625332246909, 135.7589705460798)
input = ("w",100) #行きたい方角と距離
nowPlace = [34.98625332246909, 135.7589705460798]
longest = [34.7024, 135.4959]
View infra-training.md

AWSにインスタンスを立ててみよう

  • 質問:AWSにEC2インスタンスを立てたことがある人?
  • Ubuntu 20.04のインスタンスを起動してあるのでsshでログインしてみよう
    • ubuntuユーザーでログインしてみよう
.ssh/config
@TaKO8Ki
TaKO8Ki / cd.sh
Last active May 17, 2021
An alternative to `cd`
View cd.sh
# requirements
# fd: https://github.com/sharkdp/fd
# fzf: https://github.com/junegunn/fzf
function cd() {
flag='-f'
if [ $# -eq 0 ]; then
builtin cd
elif [ $# -eq 1 ]; then
if [ $1 = "$flag" ]; then
dirs=$(fd --type d . $HOME | fzf)
@stepney141
stepney141 / BookmarkAPI_en.md
Last active Nov 29, 2021
WIP: Twitter Undocumented Endpoints for Bookmark
View BookmarkAPI_en.md

Twitter Undocumented Bookmark API (WIP)

I found out the endpoints for bookmark with Chrome Developer Tools: GET timeline/bookmark, POST bookmark/entries/remove, POST bookmark/entries/remove. The rate limits below are values returned by an official endpoint GET application/rate_limit_status.

This document is still a work in progress because I got stuck in GET timeline/bookmark. Please let me know if you find how to use it.

Notes

  • It is necessary that x-csrf-token in a request header and ct0 in a cookie are the same value. Twitter uses them to avoid CSRF attacks. I recommend that you extract the values from your browsers.
  • All of the endpoints requires OAuth2 Authorizations. Note that they refuse OAuth2 Bearer tokens obtained from POST oauth2/token.
  • You can easily reach the rate limit and get HTTP 429 Error (too many requests), so you should be careful about how many requests you send.
@yuasatakayuki
yuasatakayuki / flowchart_sample.html
Created Jan 28, 2016
テキスト形式でフローチャートを作図する例 - flowchart.js
View flowchart_sample.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<script src="raphael-min.js"></script>
<script src="flowchart-latest.js"></script>
@udzura
udzura / LICENSE
Last active May 8, 2021
やわらかRuby
View LICENSE
やわらかRubyはCC BY 4.0 で提供します。
詳細: https://creativecommons.org/licenses/by/4.0/deed.ja
This work is licensed under a Creative Commons Attribution 4.0 International License.
See also: https://creativecommons.org/licenses/by/4.0/deed
@tetu1225
tetu1225 / app.rb
Created Jul 18, 2011
Sinatraで画像ファイルをアップロードして表示する
View app.rb
require 'sinatra'
require 'haml'
# 静的コンテンツ参照のためのパス設定
set :public, File.dirname(__FILE__) + '/public'
# アップロード
get '/' do
haml :index