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
on idle {} | |
set SSID to current_SSID() | |
if SSID contains "HOME-SSID" then | |
if application "TogglDesktop" is running then | |
tell application "TogglDesktop" to quit | |
display notification "Connect " & SSID & " and stop toggl client" with title "toggle_toggl.scpt" | |
end if | |
else if SSID contains "OFFICE-SSID" then | |
if application "TogglDesktop" is not running then | |
tell application "TogglDesktop" to activate |
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
#!/usr/bin/env ruby | |
# coding: utf-8 | |
# ニュートン法によって連立方程式の解を探索するプログラム | |
THRES = 0.000001 | |
count = 0 | |
x1 = 3.0 | |
x2 = 3.0 | |
def fomula1(x1, x2) |
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
#!/usr/bin/env ruby | |
# coding: utf-8 | |
THRES = 0.000001 | |
count = 0 | |
x1 = 1.0 | |
x2 = 1.0 | |
def fomula1(x1, x2) | |
return x1 - Math.exp(x2) |
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
#!/usr/bin/env ruby | |
relative_path = `git rev-parse --show-cdup`.chomp | |
exit! unless $?.to_i == 0 | |
config_path = Dir::pwd + relative_path + "/.git/config" | |
catch_repo = /url = git@github.com:(.+).git/ | |
open(config_path) do |file| | |
file.each do |line| |
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
# .zshrc | |
# Copyright (C) 2014 Takuya Okada All Rights Reserved. | |
# source sub files | |
source ~/.zsh.d/aliases.zsh | |
source ~/.zsh.d/completion.zsh | |
source ~/.zsh.d/environment.zsh | |
source ~/.zsh.d/face.zsh | |
source ~/.zsh.d/path.zsh | |
source ~/.zsh.d/setopt.zsh |