Skip to content

Instantly share code, notes, and snippets.

@inouetmhr
inouetmhr / Strava-Feed.gs
Last active January 5, 2020 13:48 — forked from elifkus/Code.gs
Google Apps Script to retrieve data from Strava into a Spreadsheet.
// Original: https://gist.github.com/elifkus/09cd63b3cfbf4e070ecc83b4a4358eaa/281be3cc626dafeed767613ee5e3bad078268e38
// TODO; 日単位で集計(加算)して、
/**
* There is a write-up of how to get this code to run. https://elifk.us/en/retrieving-your-strava-data-with-google-app-scripts/
*/
var scriptProp = PropertiesService.getScriptProperties().getProperties();
cloud console
firebase の install , login 不要
いきなり firebase init で可
既存の firebase project に機能追加するのは firebase init functions (例)
@inouetmhr
inouetmhr / WinRM.md
Last active January 16, 2018 12:39
WinRMでのリモート再起動(不完全メモ)

Server側(リモートから再起動したいマシン)

  • 管理者権限ありの PowerShell or CMD で下記コマンドを実行
  • winrm qc

Client側 (リモートマシン)

  • 管理者権限ありの PowerShell or CMD で下記コマンドを実行
  • winrm set winrm/config/client @{TrustedHosts="<コンピューター名a>,<コンピューター名b>"}
@inouetmhr
inouetmhr / install-squid.sh
Created August 8, 2016 01:47 — forked from cdodd/install-squid.sh
Install a basic squid proxy with authentication on Centos 6 x64. Just modify the variables at the top and run the script on a clean system.
#!/bin/sh
PROXY_USER=user
PROXY_PASS=password
PROXY_PORT=3128
# Clear the repository index caches
yum clean all
# Update the operating system
@inouetmhr
inouetmhr / gist:87b5e3aa91c4d373c4e6
Last active December 2, 2018 17:13
Mac OSXのsyslogでリモートからのログを別ファイルに保存する

外部からのログ転送を受け付けるように設定

sudo defaults write /System/Library/LaunchDaemons/com.apple.syslogd.plist Sockets -dict-add NetworkListener "{ SockServiceName = syslog; SockType = dgram; }"

特定のログを別ファイルに書いてローテートするように設定

/etc/asl/remote-syslog (新規作成):

@inouetmhr
inouetmhr / gist:9a780c67c80f7a330832
Last active August 29, 2015 14:13
Mac OSX (Yosemite) で Apache WebDav

OSアップデートで設定がリセットされている。

/etc/apache2/httpd.conf で Include の WebDAV 1箇所と、LoadModuleのDav関係3つをアンコメント

/etc/apache2/extra/httpd-dav.conf を以下のように変更

DavLockDB "/tmp/DavLock"
# => /tmp/ のパーミッションに注意。/tmp/DavLock.dir /tmp/DavLock.pag が作られるはず

Alias /dav "/foo/bar/dav"

--
-- open currently active Chrome tab with Safari
-- forked from https://gist.github.com/3151932 and https://gist.github.com/3153606
--
property theURL : ""
tell application "Google Chrome"
set theURL to URL of active tab of window 0
end tell
if appIsRunning("Safari") then
@inouetmhr
inouetmhr / gist:9225142
Last active March 1, 2017 08:53
クライアントHyper-VでNATを構成する方法

クライアントHyper-VでNATを構成する方法

環境

  • Host: Windows 8.1 Pro (64bit)
  • Guest: Windows 7

手順

  • BIOSでVT-xなどが有効になっていることを確認
  • Hyper-Vのインストール(Windowsの機能追加)
@inouetmhr
inouetmhr / add-oracle-java.sh
Last active December 29, 2015 12:29
Add Oracle Java repository to Ubuntu (apt)
export HTTPS_PROXY=http//....:3128
sudo -E add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
@inouetmhr
inouetmhr / Docker.md
Created November 22, 2013 08:30 — forked from yssk22/Docker.md

Docker Overview

こんな人に有効

  • Linux 使ってるけど vagrant とか Virtual Box とか時間かかってめんどい
  • VM 作りまくって何が何だかわからなくなった
  • Warden が動かない, Buildpack なにそれおいしいの?
  • Go!

note: Ubuntu 12.04 (linux-image-3.8.0-23-generic) 使ってます。 Kernel 3.5 以前では安定しない模様。