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
{ | |
"title": "Microsoft Office で Emacs キーバインド", | |
"rules": [ | |
{ | |
"description": "Microsoft Office で Emacs キーバインド", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "b", |
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 batchDeleteEmail() { | |
var loopNumber = 50 | |
var batchSize = 100 // Process up to 100 threads at once | |
var searchSize = 400 // Limit search result to a max of 400 threads. Use this if you encounter the "Exceeded maximum execution time" error | |
for (i = 0; i < loopNumber; i += 1) { | |
var threads = GmailApp.search('label:XXXX', 0, searchSize); | |
for (j = 0; j < threads.length; j += batchSize) { | |
GmailApp.moveThreadsToTrash(threads.slice(j, j + batchSize)); | |
} |
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
<html> | |
<body> | |
<textarea class="form-control" rows="5" readonly></textarea> | |
<br> | |
<button type="button" class="btn btn-primary">Recognize</button> | |
<script type="text/javascript"> | |
const recognition = new webkitSpeechRecognition(); | |
const textarea = document.querySelector('textarea'); | |
const button = document.querySelector('button'); | |
button.addEventListener('click', function () { |
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
wget --mirror –w 2 –p -E --convert-links –P ./ https://example.com/ | |
# see more options: https://linux.die.net/man/1/wget | |
cd example.com/ | |
php -S localhost:8081 | |
# open URL http://localhost:8081 on your browser |
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
{ | |
"title": "オリジナル", | |
"rules": [ | |
{ | |
"description": "[my] Screen Brightness (fn + cmd + up/down)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "down_arrow", |
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
// Google Drive内、特定のフォルダ以下のファイルとフォルダの共有権限を削除してアクセス制限する | |
var TARGET_FOLDERS = [ // ターゲットのフォルダリスト(URLの最後の文字列部分) | |
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // 権限削除したいフォルダ1 | |
'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' // 権限削除したいフォルダ2 | |
]; | |
var me = Session.getActiveUser().getEmail(); // 自アカウントのメールアドレス | |
function main() { |
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
docker run --rm -i -v ~/.aws:/root/.aws amazon/aws-cli ec2 describe-reserved-instances-offerings \ | |
--profile kaz@cloudpack.jp --instance-type m1.large \ | |
--offering-class standard \ | |
--product-description "Linux/UNIX" \ | |
--instance-tenancy default \ | |
--filters Name=marketplace,Values=true | jq -r '.ReservedInstancesOfferings[] | | |
[.OfferingClass, .ProductDescription, .InstanceType, .OfferingType, .FixedPrice, .Duration, .ReservedInstancesOfferingId] | @csv' |
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
curl -s http://info.finance.yahoo.co.jp/fx/ | ruby -ne '$_.match(/<span id="USDJPY_top_bid">(.*?)<\/span>/){|s| puts s[1]}' |
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
cat user-list.json | jq -r '.members[] | select(.deleted==false) | "\(.id)\t\(.name)\t\(.real_name)"' |
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
cat unicode-escaped.json | ruby -ne 'puts $_.gsub(/\\u([\da-fA-F]{4})/) { [$1].pack("H*").unpack("n*").pack("U*") }' |
NewerOlder