Skip to content

Instantly share code, notes, and snippets.

View azihsoyn's full-sized avatar

Naoya Yoshizawa azihsoyn

View GitHub Profile
@voluntas
voluntas / sora_labo.rst
Last active May 29, 2024 02:33
時雨堂 Sora Labo 開発ログ
@jimschubert
jimschubert / Markdown-JavaScript.markdown.js
Last active September 24, 2023 13:31
DataGrip (IntelliJ) output SQL results to Markdown
if (!String.prototype.repeat) {
// polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
String.prototype.repeat = function(count) {
'use strict';
if (this == null) {
throw new TypeError('can\'t convert ' + this + ' to object');
}
var str = '' + this;
count = +count;
if (count != count) {
@FromAtom
FromAtom / docomo-dialog-api.coffee
Last active July 17, 2023 02:26
DOCOMOの雑談対話APIを使ってHubotと雑談する。
# Description:
# DOCOMOの雑談APIを利用した雑談
#
# Author:
# FromAtom
getTimeDiffAsMinutes = (old_msec) ->
now = new Date()
old = new Date(old_msec)
diff_msec = now.getTime() - old.getTime()
@nikushi
nikushi / gas-memo.md
Last active January 5, 2016 07:57
Google Apps Script For Beginnerを読んでいる。途中のメモ書き

chapter 1

簡単なデバッグ

*Logger.log('message') コンソールログ

  • throw('message') flash alert的なポップアップ
  • SpreadsheetApp.getActiveSpreadsheet().toast('message') Spreadsheet等の右側にポップアップメッセージ
  • Browser.msgBox('hello world'); 中央にポップアップメニュー + button。Browerクラスでは文字列入力などのポップアップも出せる

スプレッドシートの自動整形

package main
import (
"bytes"
"log"
"net/smtp"
)
func main() {
// Connect to the remote SMTP server.
@rcrowley
rcrowley / grace.go
Last active March 1, 2023 16:06
Graceful stop in Go
package main
import (
"log"
"net"
"os"
"os/signal"
"sync"
"syscall"
"time"
@reyjrar
reyjrar / elasticsearch.yml
Last active May 12, 2023 11:58
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@nuna
nuna / nintendo.log
Created March 11, 2012 14:08
任天堂採用情報ページの参考課題
$ time curl -Lso - http://bit.ly/ye8vZA | zcat | ruby -rtext -e 'w=ARGF.read.split(/\n/);p %w(インターネト プログラミングル 東強都 任人堂 東京特許許許可局 マロオブラザーズ イーサネッット コソトローラ).map{|i|w.sort_by{|j|Text::Levenshtein.distance(i,j)}[0]}'
["インターネット", "プログラミング", "東都", "任天堂", "東京特許許可局", "マリオブラザーズ", "イーサネット", "コントローラ"]
real 14m13.030s
user 13m28.858s
sys 0m5.232s
@eddarmitage
eddarmitage / InstallingGitUsingYum.md
Created March 8, 2012 14:03
Installing git on CentOS 5 using yum

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5:

@rajraj
rajraj / es.sh
Created January 3, 2012 20:07 — forked from aaronshaf/es.sh
Install ElasticSearch on CentOS 6
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share