View git-set-file-times
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
#!/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 |
View test.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View save_all_ogp_to_gyazo.user.js
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
// ==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://*/* |
View save_all_page_to_gyazo.user.js
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
// ==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/* |
View realms.py
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
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", |
View cptime.ps1
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
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 |
View main.js
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
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' | |
}); |
View wdfc.sh
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
#!/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 |
View useTwitterAndFirebaseAuth.ts
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
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 |
View App.js
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
import { StatusBar } from 'expo-status-bar'; | |
import React, { useState, useEffect } from 'react'; | |
import { StyleSheet, Text, View, ActivityIndicator, Dimensions } from 'react-native'; | |
import { Header, Avatar, Badge, Button, ButtonGroup, Card, CheckBox, Divider, Image, Input} from 'react-native-elements'; | |
const App: React.FC = () => { | |
const [text1, setText1] = useState<string>(''); | |
const [selectedIdx, setSelectedIdx] = useState<number>(0); | |
const buttons = ['What', 'the', 'Fuck']; |
NewerOlder