Skip to content

Instantly share code, notes, and snippets.

View yuiseki's full-sized avatar
🍻
I want to drink

yuiseki yuiseki

🍻
I want to drink
View GitHub Profile
@yuiseki
yuiseki / save_all_ogp_to_gyazo.user.js
Last active January 17, 2024 10:22
ブラウザで見たページにOGP画像があったら全部GyazoるUserScript
// ==UserScript==
// MEMO: See https://www.tampermonkey.net/documentation.php
//
// @name Save All OGP to Gyazo
// @namespace http://yuiseki.net
// @version 1.0
// @author You
//
// MEMO: 発動するURLの条件
// @match http://*/*
#!/usr/bin/bash
for FILE in `git ls-files`; do
COMMIT_TIME=`git -c diff.renames=false log -m -r --no-color --pretty=format:%ci -z -n1 $FILE`
echo -e "$COMMIT_TIME\t$FILE"
TIMESTAMP=`date -d "$COMMIT_TIME" +"%y%m%d%H%M.%S"`
touch -t $TIMESTAMP $FILE
done
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yuiseki
yuiseki / save_all_page_to_gyazo.user.js
Last active January 3, 2022 08:36
見たページ全部GyazoるUserScript
// ==UserScript==
// @name Save All Page to Gyazo
// @namespace http://ssig33.com
// @version 1.0
// @author You
// @match http://*/*
// @match https://*/*
// @exclude https://*.youtube.com/
// @exclude https://youtube.com/
// @exclude https://mail.google.com/*
import requests
# https://xbl.io/
OPENXBL_TOKEN = "<your OpenXBL token>"
# https://account.xbox.com/Profile?xr=mebarnav
REALMS_CLUB_ID = "<your Realms Club ID>"
headers = {
"X-Authorization": OPENXBL_TOKEN,
"Accept": "application/json;charset=UTF-8",
Param($srcFile,$destFile)
Write-Host $srcFile
Write-Host $destFile
$srcProperty = Get-ItemProperty $srcFile
$srcctime = $srcProperty.CreationTime
$srcmtime = $srcProperty.LastWriteTime
Write-Host $srcctime
Write-Host $srcmtime
const fs = require('fs').promises;
const fetch = require('node-fetch');
const { transform } = require('@moneyforward/stream-util');
const WBK = require('wikibase-sdk');
const wdk = WBK({
instance: 'https://www.wikidata.org',
sparqlEndpoint: 'https://query.wikidata.org/sparql'
});
#!/bin/bash
# wikibase-dump-filter claim transformer
# Requirements
# - jq
# - wikidata-cli
# Usage:
# ./wdfc.sh '国籍:日本&職業:政治家&~死亡年月日'
# cat humans.ndjson | wikibase-dump-filter --claim `./wdfc.sh '国籍:日本&職業:政治家&~死亡年月日'` > politicians_japan.ndjson
# See also:
# wikibase-dump-filter
@yuiseki
yuiseki / useTwitterAndFirebaseAuth.ts
Last active October 25, 2020 09:05
useTwitterAndFirebaseAuth in expo react native
import React, { useCallback, useEffect, useState } from 'react';
import { useTwitter } from 'react-native-simple-twitter';
const useTwitterAndFirebaseAuth = () => {
# 認証済みかどうかを確認している最中か否か
const [signInChecking, setSignInChecking] = useState<boolean>(true);
# 認証済みか否か
const [signedIn, setSignedIn] = useState<boolean>(false);
# twitter user data