Skip to content

Instantly share code, notes, and snippets.

Google Drive

First, I made a share folder. Access to following link and make an access request to me. Just click "Request Access". To do so, only people whom I accepted can access to the folder. https://goo.gl/GRFqwh a *The e-mail address is not mine.

I've already made some folders. I hope this will be some guideline. Please feel free to making new folders.

You can put any files to share folder.

@hiro88hyo
hiro88hyo / discord.md
Last active October 22, 2019 04:36
Instruction for Discord and Google Drive

Discord

Discord is a chat based sharing tool. You can talk with members, share the file, put the photos and so on.

I believe it is useful for idea sharing.

Create Account

  • Go to Official Site and Click "Login" button at the upper right of the site
  • Click "Register" at the bottom of "Login" button
  • Fill out valid E-mail address, username and password
<!DOCTYPE html>
<html>
<head>
<script src="elasticsearch.js"></script>
<script>
function load(){
var client = new elasticsearch.Client({
host: 'xx.xx.xx.xx:xxxx',
log: 'trace'
});
@hiro88hyo
hiro88hyo / csv2kml.rb
Created September 8, 2015 02:58
convert csv to kml
# coding: utf-8
require 'rubygems'
require 'pr_geohash'
require 'kconv'
i = 0
puts <<KML
<?xml version='1.0' encoding='UTF-8'?>
/* bin\dot.exe -Tpng:cairo:gd alchemy.dot -o alchemy.png */
digraph alchemy {
graph [rankdir = LR, fontsize = 9.0];
/* air
airplane
algae
alien
allergy
angel
if ngx.var.uri == "/_access_token" then
ngx.exit(403)
end
local cjson = require "cjson"
local zlib = require "zlib"
local app_id = "xxx"
local app_secret = "xxx"
local app_team = "xxx"
@hiro88hyo
hiro88hyo / gist:402d668887a54827becf
Created January 8, 2015 06:27
elasticsearchインストール(Ubuntu)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
curl -L -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.tar.gz
tar zxvf elasticsearch-1.4.2.tar.gz
cd elasticsearch-1.4.2.tar.gz
./bin/plugin -i elasticsearch/marvel/latest
echo 'marvel.agent.enabled: false' >> ./config/elasticsearch.yml
@hiro88hyo
hiro88hyo / sdb_on_do.c
Created September 1, 2014 03:04
SDB onDo Sensor
/*
*
* sdb_on_do.c SDB on DO Sensorのコントロールを行う
* 例によってエラー処理はあまりやってない
*
*/
#include "sdb_on_do.h"
static char *usage_msg =
@hiro88hyo
hiro88hyo / scrape.rb
Last active June 23, 2021 00:46
HorseList from netkeiba
require 'rubygems'
require 'nokogiri'
require 'kconv'
f = File.open(ARGV[0])
doc = Nokogiri::HTML(f.read.toutf8, nil, 'utf-8')
f.close
doc.search("//table[@class='nk_tb_common race_table_01']//tr[position()>1]").each{|tr|
row = Array.new
row.push tr.search("td[2]").text.chomp
@hiro88hyo
hiro88hyo / bet_ga.rb
Created May 22, 2012 23:50
Betting simulation with GA
require 'enumerator'
class BetGA
attr_accessor :amount
def initialize(o) # 初期化 入力:オッズ
@odds = o
@prob = Array.new() # 確率
@bets = Array.new() # 投票
@amounts = 50 # 購入数
@populations = 50 # 生き残り