Skip to content

Instantly share code, notes, and snippets.

View m77so's full-sized avatar
🐱
よろしくおねがいします

m77so m77so

🐱
よろしくおねがいします
  • Tokyo, Japan
View GitHub Profile
import { OutputJSON } from './dataInterface'
const fs = require('fs')
const iconv = require('iconv-lite')
const path = require('path')
if (process.argv.length - 2 !== 3) {
console.warn('The number of arguments is less or much.\n\nnode marsToTSV.js mars_sd.dat mars_nn.dat outputDir')
process.exit(100)
}
const marsSdDat = process.argv[2]
@m77so
m77so / readme.txt
Created July 12, 2018 15:01
Twitter全履歴データダウンロードするやつのれあどめ
INTRODUCTION
============
This archive consists of machine-readable JSON files containing information associated with your account. We’ve included the information we believe is most relevant and useful to you, including your profile information, your Tweets, your DMs, your Moments, your media (images, videos and GIFs you’ve attached to Tweets, DMs, or Moments), a list of your followers, a list of accounts following you, your address book, Lists that you’ve created, are a member of, or are subscribed to, interest and demographic information that we have inferred about you, information about ads that you’ve seen or engaged with on Twitter, and more.
The information contained in this archive reflects the state of the account at the time when the archive was created. In addition, if we do not have any data associated with your account for a particular category (e.g., if you have never created a List), then this archive will not include a file for that category.
CONTENTS
========
This archive contains:
@m77so
m77so / sunrise.js
Created June 5, 2018 15:31
// 2011年作成
//祝日判定関数
dayl = new array(7);
dayl=[["日",2],["月",0],["火",0],["水",0],["木",0],["金",0],["土",1]];
function holcl(y2,m2,d2,dx2){
if(m2 == 1 && d2 == 1){return ["元旦",2];}
else if(m2 == 2 && d2 ==11){return ["建国記念日",2];}
else if(m2 == 4 && d2 == 29){return ["昭和の日",2];}
else if(m2 == 5 && d2 == 3){return ["憲法記念日",2];}
else if(m2 == 5 && d2 == 5){return ["こどもの日",2];}
else if(m2 == 11 && d2 == 3){return ["文化の日",2];}
@m77so
m77so / mstdn2twtr.gs
Last active August 31, 2018 15:37
mastdon toot -> twitter tweet
var twitter = TwitterWebService.getInstance(
PropertiesService.getScriptProperties().getProperty('twitterCS'),
PropertiesService.getScriptProperties().getProperty('twitterCK')
)
function authorize() {
twitter.authorize()
}
twitter.getService = function() {
// ==UserScript==
// @name 天鳳牌譜 971777
// @version 1
// @grant none
// @include http://tenhou.net/3/
// ==/UserScript==
(function () {
const mapMjlogID = s => (/[0-9]{10}gm-[0-9a-f]{4}-[0-9]{4}-[0-9a-f]{8}/.exec(s)||[''])[0]
setInterval(()=>{
const hlist = document.querySelectorAll('#hlist a.bt3')
@m77so
m77so / MARS_NN.md
Last active November 26, 2017 17:45
MARS for MS-DOSのデータの形式のメモ

MARS_NN.DAT

換算・擬制キロに関する情報 以下の8バイトの情報が繰り返される

bit長 type 詳細
2 UInt16LE 路線ID
2 UInt16LE 営業キロ
2 UInt16LE 換算・擬制キロ
@m77so
m77so / blocked_search.js
Last active September 7, 2017 10:57
UserStreamに流れてくるユーザーから被ブロックを探索します
"use strict";
const twitter = require('twitter');
const fs = require("fs");
const twit = new twitter({
consumer_key: CK,
consumer_secret: CS,
access_token_key: AT,
access_token_secret: AS
});
@m77so
m77so / enquete.js
Last active October 13, 2016 04:51
ニコ生とかのアンケートの母数を推測するやつ
var lines = [];
var reader = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
reader.on('line', function (line) {
lines.push(line);
});
var s = function(_percent,digit,start){
var ratio = _percent/100;
<?php
function multi_file_get_contents( $urlList ) {
//http://nanoappli.com/blog/archives/5743 を HTTPSに対応させた
$resList = array();
$handle = curl_multi_init();
foreach ( $urlList as $url ) {
$res= curl_init( $url );
curl_setopt($res, CURLOPT_TIMEOUT, 500);
curl_setopt($res, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($res, CURLOPT_RETURNTRANSFER, 1);
@m77so
m77so / find.php
Created September 19, 2015 15:40
リプライ返信速度一覧にだすやつ
<?php
require_once("TwistOAuth.phar");
$account = simplexml_load_file("account_m77_.xml");
$tos = new TwistOAuth($account->consumer_key,$account->consumer_secret,$account->access_token,$account->access_token_secret);
function id2time($id){
$i=22;