View install-pam_tid-and-pam_reattach.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 | |
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 |
View ContentView.swift
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 { |
View dark.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
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)() |
View quickdarkmode.css
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); | |
} | |
} |
View gist:49b38f05d509c724a2398e0cb1813e40
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) | |
})() |
View checkMercari.scpt
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 |
View newTweet.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
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)() |
View bookmarklet_Loader-Canvas.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
/** | |
* @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. | |
* |
View MainActivity.kt
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
package com.hkitago.enablingImmersiveMode | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.os.Bundle | |
import android.os.Handler | |
import android.view.View | |
import android.webkit.JavascriptInterface | |
import android.webkit.WebView | |
import android.webkit.WebViewClient |
View getPathCoords.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 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) }) | |
} | |
/* |
NewerOlder