Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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>"}
cloud console
firebase の install , login 不要
いきなり firebase init で可
既存の firebase project に機能追加するのは firebase init functions (例)
@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();