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 PrinterConnect | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://192.168.1.33/ | |
// @match http://192.168.1.32/ | |
// @grant none | |
// ==/UserScript== |
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/local/opt/ruby/bin/ruby | |
require 'open-uri' | |
require 'json' | |
require 'time' | |
OCTPRINT_IP = "192.168.1.33" | |
HEADER = "[C]" | |
begin |
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
display notification "イジェクト処理開始" | |
set dl to {} | |
repeat with l in every paragraph of (do shell script "mount | grep -e 'msdos\\|exfat' | awk '{print $1}'") | |
set end of dl to (do shell script "diskutil info " & l & " | grep 'Volume Name:' | sed -e 's/Volume Name: //' | sed -e 's/^ *//'") | |
end repeat | |
if ((count of dl) is greater than 0) then | |
tell application "Finder" |
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
toggleInstantHotspot = [[ | |
tell application "System Events" | |
tell process "SystemUIServer" | |
tell menu bar 1 | |
set menuBarItems to (every menu bar item whose description begins with "Wi-Fi") | |
if (count of menuBarItems) is greater than 0 then | |
set wifiMenuBarItem to item 1 of menuBarItems | |
click wifiMenuBarItem | |
--接続中か判定 | |
set menuItemDisconnects to (every menu item of menu 1 of wifiMenuBarItem whose name ends with "との接続を解除") |
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
;-------------------------------- 設定 ---------------------------------- | |
TETHERING_SSIDS = {"iPhone 7 Plus", "iPhone 8 Plus"} | |
PASSWORD = "0000" | |
;-------------------------------------------------------------------------- | |
DEBUG = true | |
;-------------------------------------------------------------------------- | |
function setApplicationFirewall(arg) | |
hs.execute("echo " .. PASSWORD .. " | sudo -S /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate " .. arg) | |
end |
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/ruby | |
# iOS 13.2で搭載されたメッセージ着信時の読み上げ機能(AirPods使用時限定)を活用するため | |
# macOSのメッセージアプリから機械的にメッセージを送るスクリプト | |
# ■使い方 | |
# 引数としてテキストを渡す(空白が入る場合はダブルクォーテーションで括る) | |
# send_message.rb "なんかテキスト" | |
# | |
# 標準入力としてテキストを渡す |
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
--タイトル取得からの〜 | |
tell application "Preview" | |
set n to name of window 1 | |
--Window名から全体のページ数と現在のページ数をパースする | |
--それを監視しながらめくっていく | |
end tell | |
--全画面化 | |
tell application "Preview" to activate | |
tell application "System Events" |
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:var%20url%3DString(window.location.href)%3Bvar%20match%3Durl.match(%2F%26page%3D(%5Cd%2B)%2F)%3Bif(match%20!%3Dnull)%7Bvar%20page%3Dmatch%5B1%5D%3Bvar%20nextPage%3DString(Number(page)%2B%201)%3BnextUrl%3Durl.replace(match%5B0%5D%2Cmatch%5B0%5D.replace(page%2CnextPage))%3Bwindow.location%3DnextUrl%3B%7Delse%7Bwindow.location%3Durl%20%2B%20%22%26page%3D2%22%3B%7Dvoid(0); |
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:var%20h%3DString(location.hostname)%3Bif(h)%7Bvar%20prefix%3D%22https%3A%2F%2Fapp.neilpatel.com%2Fjp%2Ftraffic_analyzer%2Foverview%3Fdomain%3D%22%3Bwindow.open(prefix%20%2B%20encodeURIComponent(h)%2B%20%22%26country%3Djp%22)%3B%7Dvoid(0); |