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
| # -*- coding: utf-8 -*- | |
| # | |
| # このファイルは: | |
| # macSKKでAZIKを使うためのローマ字変換ルールです。 | |
| # AZIK部分はAquaSKKの`azik_us.rule`をベースにしています。 | |
| # https://github.com/codefirst/aquaskk | |
| # | |
| # このファイルの構成: | |
| # - ファイル前半はmacSKKの元々のローマ字変換ルール | |
| # - ファイル後半はAZIK入力用のローマ字変換ルール |
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
| version: "3" | |
| services: | |
| nginx-proxy: | |
| image: jwilder/nginx-proxy | |
| container_name: nginx-proxy | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - /var/run/docker.sock:/tmp/docker.sock:ro |
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 | |
| # | |
| # NHK語学講座のらじる★らじる聴き逃しサービスを取得するRubyスクリプト | |
| # https://riocampos-tech.hatenablog.com/entry/20200402/radirudegogaku | |
| # の一括ダウンロード用シェルスクリプト。必要ない講座はコメントアウトして | |
| # radirudegogaku0.rb と同じディレクトリに置いて実行してください。 | |
| programs=() | |
| programs+=("0677_01") # 基礎英語1 | |
| programs+=("0694_01") # 基礎英語2 |
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
| package 'gdebi' | |
| execute 'install chrome' do | |
| deb_name = 'google-chrome-stable_current_amd64.deb' | |
| commands = [ | |
| 'cd /tmp', | |
| "wget https://dl.google.com/linux/direct/#{deb_name}", | |
| "gdebi --n ./#{deb_name}" | |
| ] | |
| command commands.join(' && ') | |
| not_if 'command -v google-chrome' |
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 'uri' | |
| require 'net/http' | |
| require 'openssl' | |
| class DropboxAPI | |
| def initialize(access_token:) | |
| @access_token = access_token | |
| end | |
| def upload(source:, dest:, mode: :overwrite) | |
| uri = URI.parse('https://content.dropboxapi.com') |
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 'rss' | |
| require 'open-uri' | |
| url = 'http://feeds.feedburner.com/Ruby5' | |
| open(url) do |rss| | |
| feed = RSS::Parser.parse(rss) | |
| feed.items.each do |item| | |
| `wget #{item.enclosure.url}` | |
| end | |
| end |
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 'yaml' | |
| Dir::glob("/var/quick/companies/*").each do |f| | |
| data = YAML.load(File.read f).merge({updated_at: File.stat(f).mtime}) | |
| File.write(f, data.to_yaml) | |
| end |
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
| # Chef インストールしたいけど手動しか無理そう | |
| # VirtualBox addon | |
| sudo apt-get update | |
| sudo apt-get install virtualbox-guest-dkms | |
| # Git | |
| sudo apt-get install git | |
| # Dropbox |
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 'nokogiri' | |
| require 'open-uri' | |
| require 'selenium-webdriver' | |
| driver = Selenium::WebDriver.for :firefox | |
| doc = Nokogiri::HTML open ARGV[0] | |
| urls = doc.search("a.lesson_title").map{|n| n['href']} | |
| vimeo_urls = urls.map do |url| | |
| driver.navigate.to "http://dotinstall.com#{url}" | |
| doc = driver.page_source |
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
| (global-set-key "\M-^" (lambda () (interactive) (insert "|"))) | |
| (global-set-key "\M-i" (lambda () (interactive) (insert "∫"))) | |
| (global-set-key "\M-s" (lambda () (interactive) (insert "Σ"))) | |
| (define-key text-mode-map "\M-s" (lambda () (interactive) (insert "Σ"))) | |
| (global-set-key "\M-8" (lambda () (interactive) (insert "∞"))) | |
| (global-set-key "\M-e" (lambda () (interactive) (insert "∈"))) | |
| (global-set-key [(meta shift e)] (lambda () (interactive) (insert "∃"))) | |
| (global-set-key "\M-p" (lambda () (interactive) (insert "π"))) | |
| (global-set-key [(meta shift p)] (lambda () (interactive) (insert "Π"))) | |
| (global-set-key "\M-u" (lambda () (interactive) (insert "∪"))) |
NewerOlder