Skip to content

Instantly share code, notes, and snippets.

View shinriyo's full-sized avatar

shinriyo shinriyo

View GitHub Profile
@opnchaudhary
opnchaudhary / numbertoword.js
Last active December 2, 2018 08:36
Converts Numbers to Words
// Convert numbers to words
// copyright 25th July 2006, by Stephen Chapman http://javascript.about.com
// permission to use this Javascript on your web page is granted
// provided that all of the code (including this copyright notice) is
// used exactly as shown (you can change the numbering system if you wish)
/*
Documentation: Usage
=====================
1. Import the javascript file:
@ledsun
ledsun / toWareki.js
Created July 23, 2012 04:51
JavaScript 西暦→和暦の変換処理
function toWareki(year,month,day)
{
var wareki = "";
year = Number (year);
if (year == 1868)
{
/* 9月8日から明治元年 */
/* 誕生日がここの人はいないだろうから細かくは気にしない */
wareki = '明治元年';
}
require "open-uri"
[
"http://pastebin.com/raw.php?i=Kc9ng18h",
"http://pastebin.com/raw.php?i=vCMndK2L",
"http://pastebin.com/raw.php?i=JdQkuYwG",
"http://pastebin.com/raw.php?i=fw43srjY"
].each do |url|
open(url).each_line do |line|
name, password = line.chomp.split(/:/)
@yamakk
yamakk / google_weather_api.py
Created September 30, 2011 10:04
Google Weather APIから天候、湿度、風速、風向を取得する
#coding:utf-8
"""
unofficial Google Weather API
http://www.google.com/ig/api?weather=,,,35693692,139700260&hl=ja
レスポンスのエンコーディングは hl=jaの場合Shift-JIS hl=enの場合ASCII
<xml_api_reply version="1">
<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0">
<forecast_information>
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.