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
# http://www.diigo.com/tools/exportからRSS Formatで取得したファイルを | |
# import.txtとして保存して実行 | |
# 量が多いと、Rate Limit Exceededになるので注意 | |
require "cgi" | |
require "net/https" | |
ril = File.read("import.txt") | |
unread = ril.scan(%r{<link>(.*?)</link>}m) |
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
set rtn to choose from list {"44,100 Hz", "48,000 Hz", "96,000 Hz"} with prompt "出力フォーマット" | |
if (count rtn) is 0 then | |
return | |
end if | |
set fmt to item 1 of rtn | |
set target to {"BlackHole 2ch", "BlackHole 16ch", "Background Music", "Background Music (UI Sounds)", "MacBook Proのスピーカー"} | |
set processName to "Audio MIDI Setup" | |
set windowName to "オーディオ装置" |
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
version: '3.7' | |
volumes: | |
mysql: | |
redminefiles: | |
networks: | |
redmine: | |
services: | |
redmine: | |
image: redmine:4.2 | |
restart: always |
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
#!/bin/sh | |
PING_TARGET=$1 | |
COUNT_LIMIT=$2 | |
echo "try ping to ${PING_TARGET}" | |
COUNT=1 | |
while true;do |
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
--- | |
- hosts: localhost | |
connection: local | |
become: yes | |
tasks: | |
- name: remove ipv6 hosts entry | |
shell: sed -i -e '/::/d' -e '/IPv6/d' /etc/hosts | |
- name: find ipv6 kernel parameter | |
shell: sysctl --all | egrep '^net.ipv6\..*disable' | awk '{print $1}' | |
register: ipv6_sysctl_list |
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
#!/bin/sh | |
ANSIBLE_DIR=$1 | |
mkdir -p ${ANSIBLE_DIR}/roles | |
cd ${ANSIBLE_DIR} | |
cat << EOS > galaxy.yml | |
# java install | |
- src: williamyeh.oracle-java |
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
# キーボード入力向け日付補完 | |
# 動作検討版 | |
# | |
# sugar.jsに依存しています | |
class DateSuggest | |
now: new Date() | |
japan_year: | |
"m": 1867, | |
"t": 1911, |
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
# -*- coding: utf-8 -*- | |
require 'mail' | |
require 'active_support/core_ext' | |
require 'date' | |
require 'toodledo' | |
gmail_account = 'xxxxxxxxx' | |
gmail_password = 'xxxxxxxx' |
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
require 'active_support/core_ext' | |
Array.class_eval do | |
def stringify_keys | |
map { |v| v.respond_to?('stringify_keys') ? v.stringify_keys : v } | |
end | |
end | |
Hash.class_eval do | |
alias :old_stringify_keys :stringify_keys |
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
#!/bin/bash | |
# macでフォーマットしたipodをWindowsに持ってきたときUnicodeの正規化により | |
# 困ったことになるのを解消 | |
# Windows上で、cygwinとnkfが入っている環境を想定。 | |
CMD_NKF=nkf32 | |
CMD_AWK=gawk | |
IFS=$'\n' |
NewerOlder