Skip to content

Instantly share code, notes, and snippets.

View ikemo3's full-sized avatar

Hideki Ikemoto ikemo3

  • Ehime, Japan
View GitHub Profile
@ikemo3
ikemo3 / google-spreadsheets-ctrl-e.js
Last active January 17, 2021 12:56
GoogleスプレッドシートでCtrl + Eを使う(TamperMonkey対応)
// ==UserScript==
// @name Emacs Ctrl + E
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Enable Ctrl + E(go to end-of-line) to Google Spreadsheet
// @author Hideki Ikemoto
// @match https://docs.google.com/spreadsheets/d/*
// @grant none
// ==/UserScript==
@ikemo3
ikemo3 / main.js
Last active June 16, 2019 22:43
たすくまの過去のメールを引っ張り出すGoogle Apps Script
function main() {
wakeupTaskumaMail(nowMinusDate(7));
wakeupTaskumaMail(nowMinusDate(30));
}
function wakeupTaskumaMail(date) {
const query = "label:たすくま " + toYYYYMMDD(date);
const threads = GmailApp.search(query);
for (var i = 0; i < threads.length; i++) {
@ikemo3
ikemo3 / vmimg-to-tar.sh
Created April 21, 2018 08:14
virtual machine image to tarball.
#!/bin/bash
if [ $# -ne 3 ]
then
echo "vmimg-to-tar.sh vm-image-path path-to-write tar-out-file"
exit 1
fi
IMG=$1
PATH_TO_WRITE=$2
@ikemo3
ikemo3 / itunes-lookup.rb
Created April 12, 2018 14:00
iTunes Lookup APIを使ってタイトルとアイコンを取得するコードです。
#!/usr/bin/ruby
require 'json'
require 'uri'
require 'open-uri'
id = ARGV[0]
params = {:id => id}
# URLを作成
@ikemo3
ikemo3 / check.rb
Last active February 28, 2017 09:56 — forked from hyuki0000/check.rb
何か行動するときのチェックリストをチェックする簡単なRubyスクリプト
#!/usr/bin/env ruby
DIRECTORY = ENV['HOME'] + '/.check'
def check(file)
File::open(file) do |f|
f.each_line do |line|
# ignore blank line
next if line =~ /^\n/