This file contains hidden or 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
| # Keyball61 | |
| KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="5957", ATTRS{idProduct}=="0100", MODE="0666" |
This file contains hidden or 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 myFunction() { | |
| run('webHookUrl', 'myFunction') | |
| } | |
| function run(webHookUrl, mainFuncName) { | |
| if (isBizDay()) { | |
| const payload = { | |
| text: "デイリーまでにスレッドでみんなに報告しよう!\nテンプレ:\n前日にやったこと\n今日やること\n困ってること・相談したいこと等", | |
| link_names: 1, | |
| }; |
This file contains hidden or 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
| // Execute `authy --remote-debugging-port=5858`, access to http://localhost:5858 on a web browser, then paste code below in the dev console. | |
| // ref: https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93 | |
| function hex_to_b32(hex) { let alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; let bytes = []; for (let i = 0; i < hex.length; i += 2) { bytes.push(parseInt(hex.substr(i, 2), 16)); } let bits = 0; let value = 0; let output = ''; for (let i = 0; i < bytes.length; i++) { value = (value << 8) | bytes[i]; bits += 8; while (bits >= 5) { output += alphabet[(value >>> (bits - 5)) & 31]; bits -= 5; } } if (bits > 0) { output += alphabet[(value << (5 - bits)) & 31]; } return output; } | |
| console.clear(); | |
| console.warn("Here's your Authy tokens:"); | |
| var data = appManager.getModel().map(function (i) { | |
| var secretSeed = i.secretSeed; | |
| if (typeof secretSeed == 'undefined') { |
This file contains hidden or 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
| # mfa completion | |
| function _mfa_comp() { | |
| local cur=${COMP_WORDS[${COMP_CWORD}]} | |
| local opts="$(cat $HOME/.ssh/mfa.txt | cut -f1)" | |
| COMPREPLY=($(compgen -W "$opts" -- "$cur")) | |
| } | |
| complete -F _mfa_comp mfa |
This file contains hidden or 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
| headerbar.default-decoration { | |
| padding-top: 0px; | |
| padding-bottom: 0px; | |
| min-height: 0px; | |
| font-size: 0.6em; | |
| } | |
| headerbar.default-decoration button.titlebutton { | |
| padding: 0px; | |
| min-height: 0px; |
This file contains hidden or 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/python3 | |
| # | |
| # Print CloudWatch log stream to stdout. | |
| # Referring to https://qiita.com/shinsaka/items/23a37873a23bdc2fc7fb | |
| # | |
| import boto3 | |
| from datetime import datetime | |
| import sys |
This file contains hidden or 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 -e | |
| LANG=C snap list --all | awk '/disabled/{print $1, $3}' | | |
| while read snapname revision; do | |
| sudo snap remove "$snapname" --revision="$revision" | |
| done |
This file contains hidden or 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 | |
| for f in com.visualstudio.code firefox simplescreenrecorder brave-browser | |
| do | |
| find ./WhiteSur/ -name "*${f}*" -exec rm -f {} \; | |
| find ./WhiteSur-dark/ -name "*${f}*" -exec rm -f {} \; | |
| done | |
| rm -f ./WhiteSur/icon-theme.cache | |
| rm -f ./WhiteSur-dark/icon-theme.cache | |
| gtk-update-icon-cache ./WhiteSur/ |
This file contains hidden or 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 waitFor(validateSync: () => void, timeout = 1000, checkInterval = 50): Promise<void> { | |
| const start = Date.now() | |
| let elapsed = 0 | |
| return new Promise<void>((resolve: () => void, reject: (reason: unknown) => void): void => { | |
| const check = (): void => { | |
| try { | |
| validateSync() | |
| resolve() | |
| return | |
| } catch (e: unknown) { |
This file contains hidden or 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
| # from https://www.wikigain.com/how-to-install-macos-big-sur-on-virtualbox-on-windows-pc/ | |
| vboxmanage modifyvm "iMac" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff | |
| vboxmanage setextradata "iMac" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac19,1" | |
| vboxmanage setextradata "iMac" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
| vboxmanage setextradata "iMac" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-AA95B1DDAB278B95" | |
| vboxmanage setextradata "iMac" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" | |
| vboxmanage setextradata "iMac" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 | |
| # Change display resolution | |
| vboxmanage setextradata "iMac" "VBoxInternal2/EfiGraphicsResolution" 1440x900 |
NewerOlder