Skip to content

Instantly share code, notes, and snippets.

Nomura, Yoshihide yoshimov

Block or report user

Report or block yoshimov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mastodon-on-ecs-price.md

Mastodon on ECSの構成

これだけ使ってみました。

  • Amazon ELB x2
    • Webサイト用とStreaming用に2つ用意
  • Amazon ElastiCache x1
    • Redisのt2.micro
  • Amazon RDS x1
    • PostgreSQLのt2.micro
@yoshimov
yoshimov / mastodon-http.diff
Last active May 19, 2017
mastodon v1.3.3 patch for http server
View mastodon-http.diff
--- /mastodon/app/lib/tag_manager.rb.org
+++ /mastodon/app/lib/tag_manager.rb
@@ -69,7 +69,7 @@
uri = Addressable::URI.new
uri.host = domain.gsub(/[\/]/, '')
- uri.normalize.host
+ uri.normalize.authority
end
@yoshimov
yoshimov / esp8266-espruino-light-sensor.js
Created Sep 8, 2016
Light sensor script for Espruino on ESP8266
View esp8266-espruino-light-sensor.js
var http = require("http");
var pre = 0;
var count = 0;
var MAX = 50;
var TIMEOUT = 100;
var POSTURL="http://dweet.io/dweet/for/xxx";
var NOTIFYURL="http://auto-remote-url";
function loop() {
// 0 < val < 1
@yoshimov
yoshimov / fetch-latest-dweet.gs
Created Sep 1, 2016
Fetch latest dweet data and append to spreadsheet
View fetch-latest-dweet.gs
function addData(time, val) {
var sheet = SpreadsheetApp.getActiveSheet();
var last = sheet.getLastRow();
var cell = sheet.getRange(last, 1);
var pretime = cell.getValue();
if (pretime != time) {
cell.offset(1, 0).setValue(time);
cell.offset(1, 1).setValue(val);
}
}
@yoshimov
yoshimov / slack-train-notify.gs
Last active Sep 13, 2016
Notify train accident to Slack using Google Apps Script
View slack-train-notify.gs
// GAS Script for train daemon on Slack
// ScriptProperties:
// - trainUrl: JR line information web page URL
// - trainName: Name of JR line
// - slackHookUrl: Slack web hook URL
// - slackChannel: Channel name of Slack
function trainRetrieve() {
var url = PropertiesService.getScriptProperties().getProperty("trainUrl");
@yoshimov
yoshimov / slack-rain-notify.gs
Last active Sep 13, 2016
Notify tenki.jp weather to Slack using Google Apps Script
View slack-rain-notify.gs
// GAS Script for weather daemon on Slack
// ScriptProperties:
// - weatherUrl: Local weather web page URL on tenki.jp
// - slackHookUrl: Slack web hook URL
// - slackChannel: Channel name of Slack
function rainRetrieve() {
var url = PropertiesService.getScriptProperties().getProperty("weatherUrl");
var res = UrlFetchApp.fetch(url);
View Powershell-batch.bat
@powershell -NoProfile -ExecutionPolicy Unrestricted "$s=[scriptblock]::create((gc \"%~f0\"|?{$_.readcount -gt 1})-join\"`n\");&$s" %*&goto:eof
# some powershell script
View pebble-bigdate.html
<html>
<head>
<link rel="stylesheet" href="https://rawgit.com/pebble/slate/master/dist/css/slate.min.css" />
</head>
<body>
<h1 class="title">BigDate configuration</h1>
<div class='item-container'>
<div class='item-container-content'>
<label class='item'>
@yoshimov
yoshimov / pebble-habitrpg.html
Created Jun 23, 2015
Configuration page for Pebble-HabitRPG
View pebble-habitrpg.html
<html>
<body>
<h2>HabitRPG for Pebble configuration</h2>
<table>
<tr>
<th>Your UUID: </th><td><input type="text" id="uuid" name="uuid" size="60" /></td>
</tr>
<tr>
<th>API Key: </th>
<td><input type="text" id="key" name="key" size="60" /></td>
@yoshimov
yoshimov / gollum-multibyte.diff
Last active Aug 29, 2015
gollum-multibyte.diff for gollum 4.0.0
View gollum-multibyte.diff
*** ./lib/gollum/helpers.rb.org Thu Feb 27 00:19:51 2014
--- ./lib/gollum/helpers.rb Thu Feb 27 00:20:35 2014
***************
*** 6,12 ****
return nil if file_path.nil?
last_slash = file_path.rindex("/")
if last_slash
! file_path[0, last_slash]
end
end
You can’t perform that action at this time.