Skip to content

Instantly share code, notes, and snippets.

View fono09's full-sized avatar

ふぉの(やわめ) fono09

View GitHub Profile
@purintai
purintai / kakakucomPrice.gs
Last active February 20, 2017 06:34
価格.comのitemページから値段取得して返すだけの関数
// Only for Google Scripts
function kakakucomPrice(itemUrl) {
try {
var response = UrlFetchApp.fetch(itemUrl);
if (response.getResponseCode() == 200) {
var html = response.getContentText();
re = /ecomm_totalvalue: \'(\d+)\'/;
var result = html.match(re);
if (result == null) {
return "Sold out";
@kyledrake
kyledrake / gist:1498932
Last active August 2, 2016 04:31
Neocities' Rainbows! config file - https://neocities.org
# This is Neocities' Rainbows! config file. We are using this in production to run all our web apps.
# It works really well for us and has been heavily load tested, so I wanted to share it with the community.
#
# In my opinion, this is the best way to deploy a ruby web application. Unlike EventMachine based solutions,
# it uses real ruby threads, which allows it to take advantage of the internal non-blocking IO pattern
# in MRI.
#
# Contrary to popular belief, MRI doesn't block execution to wait on IO when you are using threads, even
# with the GIL. The requests are done concurrently for anything that is based on the IO class. This
# includes things like Net::HTTP and even `system commands`. Grep the MRI Ruby source code for