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/env ruby | |
| require "./event.rb" | |
| TODAYS_EVENTS_SAMPLE = [ | |
| "allday だれかさん誕生日 おめでとう", | |
| "10:00-12:00 GN検討打合せ", | |
| "11:30-12:30 昼食会", | |
| "13:00-16:00 New開発", | |
| "17:15-18:00 テスト", |
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/env ruby | |
| require "./event.rb" | |
| def filter(events, &block) | |
| filtered = EventCollection.new | |
| events.each do |ev| | |
| filtered << ev if yield(ev) | |
| end | |
| return filtered |
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/env ruby | |
| require "./event.rb" | |
| def filter(events, &block) | |
| filtered = EventCollection.new | |
| events.each do |ev| | |
| filtered << ev if yield(ev) | |
| end | |
| return filtered |
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
| (require 'popup) | |
| (require 'stem) | |
| (defun dic-find-first (word-list lookup-func) | |
| (let ((result)) | |
| (catch 'ret | |
| (while (car word-list) | |
| (if (setq result (funcall lookup-func (car word-list))) | |
| (throw 'ret result)) | |
| (setq word-list (cdr word-list)))))) |
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/ruby | |
| # -*- coding: utf-8 -*- | |
| # Please add INDEX to speedup the SQL queries which use LIKE clauses: | |
| # | |
| # sqlite3 "#{DICT_FILE}" 'CREATE INDEX dict_key ON dict (key COLLATE NOCASE);' | |
| SQLITE = "sqlite3" | |
| DICT_FILE = "'#{ENV['HOME']}/foo/bar/mouseoverdictionary.sqlite'" |
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
| ;;; gmail-grabber.el --- Fetch Gmail article showed in web browser into local folder | |
| ;; Description: Fetch Gmail article showed in web browser into local folder | |
| ;; Author: Yoshinari Nomura <nom@quickhack.net> | |
| ;; Created: 2020-01-30 | |
| ;; Version: 0.1.1 | |
| ;; Keywords: Mew Gmail | |
| ;; URL: | |
| ;; Package-Requires: |
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
| <html> | |
| <canvas id="canvas" width="300" height="300"></canvas> | |
| <script> | |
| let canvas = document.getElementById('canvas'); | |
| let ctx = canvas.getContext('2d'); | |
| ctx.strokeRect(0, 0, 300, 300); | |
| canvas.addEventListener('click', ev => handle_click(ev)); |
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
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; Mew XOAUTH2 | |
| ;; | |
| ;; * Setup | |
| ;; | |
| ;; 1) Install oauth2.el and GnuPG | |
| ;; | |
| ;; 2) In your .emacs: | |
| ;; | |
| ;; (with-eval-after-load 'mew |
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
| // Copyright (C) 2022 Takashi Kokubun | |
| // Licence: GPLv2+ | |
| const { Gio } = imports.gi; | |
| class Xremap { | |
| constructor() { | |
| } | |
| enable() { |
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
| sudo apt-get update | |
| sudo apt-get upgrade | |
| mkdir -p $HOME/var/log | |
| alias mark='apt-mark showmanual > $HOME/var/log/apt-mark-showmanual-$(hostname --short)-$(date +%Y%m%d-%H%M%S).log; gsettings list-recursively > $HOME/var/log/gsettings-list-recursively-$(hostname --short)-$(date +%Y%m%d-%H%M%S).log' | |
| mark |