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 | |
set -e | |
set -o pipefail | |
# pam_tidの存在チェック(間違えてLinux環境などで実行されたら中断する) | |
test -f /usr/lib/pam/pam_tid.so.2 || exit 1 | |
# sudoでTouchIDが使えるようにする | |
if ! grep -Eq '^auth\s.*\spam_tid\.so$' /etc/pam.d/sudo; then | |
( set -e; set -o pipefail |
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
// | |
// ContentView.swift | |
// WKWebViewTemplate | |
// | |
// Created by Hiroyuki KITAGO on 2022/01/26. | |
// | |
import SwiftUI | |
import WebKit | |
struct ContentView: View { |
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
javascript:(()=>%7BcssText='@media(prefers-color-scheme:dark){body{filter:invert(1) hue-rotate(180deg);background-color:#000}img{filter:invert(1) hue-rotate(180deg)}}';textNode=document.createTextNode(cssText);styleNode=document.createElement('style');styleNode.appendChild(textNode);document.getElementsByTagName('head')[0].appendChild(styleNode)%7D)() |
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
@media (prefers-color-scheme: dark) { | |
body { | |
filter: invert(1) hue-rotate(180deg); | |
background-color:#000; | |
} | |
img { | |
filter: invert(1) hue-rotate(180deg); | |
} | |
} |
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
(function() { | |
'use strict' | |
const newWindow = window.open('') | |
const newScript = document.createElement('script') | |
const injectScript = ()=>{ | |
// The code to inject | |
} | |
newScript.innerHTML = injectScript.toString() | |
newWindow.document.body.appendChild(newScript) | |
})() |
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
property BASE_URL : "https://www.mercari.com/jp/search/?sort_order=price_asc&keyword={検索語}&status_on_sale=1" | |
property itemsCnt : 0 | |
set theTargetFile to ((((path to me as text) & "::") as alias) as string) & "checkMercari.txt" | |
set prevData to my read_from_file(theTargetFile) | |
try | |
set prevCnt to prevData as integer | |
on error | |
set prevCnt to itemsCnt | |
end try |
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
javascript:(()=>%7Bd=document,w=window,t='"'+(w.getSelection?w.getSelection():d.getSelection?d.getSelection():d.selection.createRange().text)+'"';if(!t%7C%7Ct=='')%7Bvoid(t=prompt('Create new Tweet:',''));%7Dif(t)w.open('https://twitter.com/intent/tweet?text='+encodeURI(t+' '+location.href))%7D)() |
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
/** | |
* @summary Bookmarklet_Loader | |
* @description Loader for Bookmarklet - injects the required CSS and Javascript into a page | |
* @file Bookmarklet_Loader.js | |
* @author HKITAGO (hkitago.com) | |
* @license GPL v2 | |
* @contact hkitago.com/contact/ | |
* | |
* @copyright Copyright 2019- hkitago.com. | |
* |
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
/***************************************************************************** | |
* Put <uses-permission android:name="android.permission.INTERNET" /> in AndroidManifest.xml | |
* and <WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent"/> in activity_main.xml | |
****************************************************************************/ | |
package com.hkitago.enablingImmersiveMode | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.os.Build | |
import android.os.Bundle |
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 posFrom = { 'lat': 35.799465, 'lng': 138.356991 } | |
const posTo = { 'lat': 35.801618, 'lng': 138.355843 } | |
const frame = 110 | |
let pathCoords = [] | |
for(let i = 0; i < frame; i++) { | |
pathCoords.push({ 'lat': (posFrom.lat + ((posTo.lat - posFrom.lat) / frame) * i) | |
, 'lng': (posFrom.lng + ((posTo.lng - posFrom.lng) / frame) * i) }) | |
} | |
/* |