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
| #!/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 "json" | |
| require "date" | |
| class Event | |
| attr_reader :start_time, :end_time, :summary, :description | |
| def initialize(start_time, end_time, summary, description) | |
| @start_time, @end_time, @summary, @description = |
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 | |
| $DEBUG = false | |
| module OrgTodo | |
| # * Document | |
| # Document consists of a PREAMBLE part and SECTIONS. | |
| # + PREAMBLE is the first part of Org document such as: | |
| # : #+TITLE: Blah | |
| # : #+AUTHOR: Yoshinari Nomura |
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/sh | |
| # usage: make-icon-badge.sh [diameter_in_cm] src_file dst_file | |
| # make-icon-badge.sh 3.6 nom-with-cray.jpg nom-with-cray.png | |
| # Crop or mask an image into a circle - Stack Overflow | |
| # https://stackoverflow.com/questions/999251/crop-or-mask-an-image-into-a-circle | |
| # | |
| # I want to change DPI with ImageMagick without changing the actual byte-size of the image data | |
| # https://superuser.com/questions/479197/i-want-to-change-dpi-with-imagemagick-without-changing-the-actual-byte-size-of-t |
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
| (with-eval-after-load 'org | |
| (if (fboundp 'org-link-set-parameters) | |
| ;; org version 9 | |
| (org-link-set-parameters "gmail" | |
| :follow #'glima-org-gmail-message-open | |
| :store #'mewx-org-store-link) | |
| ;; org version 8 | |
| (org-add-link-type "gmail" 'glima-org-gmail-message-open) | |
| (setq org-store-link-functions | |
| (cons 'mewx-org-store-link org-store-link-functions)))) |
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 | |
| ################################################################ | |
| ## Usage | |
| usage() { | |
| echo "ame [-c CONFIG_FILE] [-t TEAM] ICON TEXT" | |
| echo " -c Set config file name." | |
| echo " -t Set Slack team name." | |
| echo "examples:" |
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
| ;;; otama.el --- Org-table as database. | |
| ;; Description: Org-table as database. | |
| ;; Author: Yoshinari Nomura <nom@quickhack.net> | |
| ;; Created: 2016-02-03 | |
| ;; Version: 1.0.0 | |
| ;; Keywords: database, org-mode | |
| ;; 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
| #!/bin/sh | |
| APP_NAME="$1" | |
| IGN_MORE="https://raw.github.com/github/gitignore/master/Rails.gitignore" | |
| mkdir "$APP_NAME" && cd "$APP_NAME" || exit 1 | |
| bundle init || exit 1 | |
| echo 'gem "rails"' >> Gemfile |