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 | |
| echo start ssh session 1>&2 | |
| ssh -T -N -f -oControlMaster=yes -oControlPath=~/.ssh/master.$$.%r@%h:%p hoge.com | |
| echo command execution on remote 1>&2 | |
| ssh -oControlMaster=no -oControlPath=~/.ssh/master.$$.%r@%h:%p hoge.com echo echo on remote | |
| echo close connection 1>&2 | |
| ssh -O exit -oControlMaster=no -oControlPath=~/.ssh/master.$$.%r@%h:%p hoge.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
| a=6377.39715500 | |
| e=sqrt(0.006674372230614)) | |
| h=0 | |
| phi=34 | |
| lambda=130 | |
| N=a/sqrt(1-e*e*sin(phi)*sin(phi)) | |
| X=(N+h)*cos(phi)*cos(lambda) | |
| Y=(N+h)*cos(phi)*sin(lambda) |
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
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cmath> | |
| #include <unistd.h> | |
| #include <vector> | |
| const double length1 = 1; | |
| const double length2 = 1; |
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 | |
| echo cat /nvidia_smi_log/gpu/temperature/gpu_temp/text\(\) | xmllint --shell =(nvidia-smi -q -x) | grep -v "^\/ >" |
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 | |
| # -*- coding: utf-8 -*- | |
| require 'rubygems' | |
| require 'twitter' | |
| Twitter.configure do |config| | |
| config.consumer_key = YOUR_CONSUMER_KEY | |
| config.consumer_secret = YOUR_CONSUMER_SECRET | |
| config.oauth_token = YOUR_OAUTH_TOKEN |
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 | |
| require 'fileutils' | |
| def flatten(path) | |
| Dir::entries(path).each do |fn| | |
| next if fn=="." || fn==".." | |
| FileUtils::mv("#{path}/#{fn}", "#{path}__#{fn}") | |
| end | |
| FileUtils::rmdir(path) |
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 -*- | |
| $tel_self="09012345678" | |
| $email_self="hoge@fuga.com" | |
| def analyse_vcard(fin) | |
| line = fin.gets | |
| tel=nil | |
| while line |
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 -*- | |
| require 'net/imap' | |
| require 'kconv' | |
| Net::IMAP::debug = true | |
| imap = Net::IMAP.new('imap.gmail.com', 993, true) | |
| imap.login('hoge@gmail.com', 'pass') |
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 | |
| # -*- coding: utf-8 -*- | |
| require 'nokogiri' | |
| require 'net/http' | |
| require 'net/https' | |
| $router_user = "hoge" |
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 | |
| platform="$(uname -s).$(uname -p)" | |
| if [ -n "$1" ]; then | |
| prog="$1" | |
| shift | |
| if [ -e "$prog.$platform" ]; then |