Skip to content

Instantly share code, notes, and snippets.

Sugano Yoshihisa(E) koshian

Block or report user

Report or block koshian

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
@koshian
koshian / keybase.md
Last active Aug 20, 2019
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am koshian on github.
  • I am koshian (https://keybase.io/koshian) on keybase.
  • I have a public key ASDULZOnf49rctv1ijPAyeR77gJTobPB6hLzh_FIXVK98Qo

To claim this, I am signing this object:

@koshian
koshian / j-magazine-scraper.rb
Created Sep 25, 2018
日本雑誌協会の印刷部数公表データからコミック誌の部数を拾ってきてCSV出力するスクリプトです。
View j-magazine-scraper.rb
#!/usr/bin/env ruby
# coding: utf-8
require 'nokogiri'
require 'open-uri'
require 'csv'
uri_template = 'https://www.j-magazine.or.jp/user/printed/index/%d/%d'
result = []
periods = []
@koshian
koshian / hbpost.rb
Last active Apr 20, 2017
はてなブックマークとマストドンを連携するためのCGIスクリプト
View hbpost.rb
#!/usr/bin/ruby
# coding: utf-8
#
require 'cgi'
require 'net/https'
API_POINT = 'https://mstdn.jp/api/v1/statuses'
HBKEY='XXXXXXXXXXX'
ACCESS_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
@koshian
koshian / mozc_emacs_helper_build.patch
Last active Feb 20, 2016
To build mozc_emacs_helper on Mac OS X
View mozc_emacs_helper_build.patch
diff --git a/src/build_mozc.py b/src/build_mozc.py
index b972602..59a65d0 100644
--- a/src/build_mozc.py
+++ b/src/build_mozc.py
@@ -211,6 +211,8 @@ def GetGypFileNames(options):
# Include subdirectory of win32 and breakpad for Windows
if options.target_platform == 'Windows':
gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
+ elif options.target_platform == 'Mac':
+ gyp_file_names.extend(glob.glob('%s/unix/emacs/*.gyp' % SRC_DIR))
View hatenablog_sample_entry.md

段落

あのイーハトヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモーリオ市、郊外のぎらぎら光る草の波。

あのイーハトヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモーリオ市、郊外のぎらぎら光る草の波。

フォトライフ

@koshian
koshian / # sfntly - 2015-12-30_10-24-43.txt
Created Dec 30, 2015
sfntly (bramstein/webfonttools/sfntly) on OS X 10.11.2 - Homebrew build logs
View # sfntly - 2015-12-30_10-24-43.txt
Homebrew build logs for bramstein/webfonttools/sfntly on OS X 10.11.2
Build date: 2015-12-30 10:24:43
View make_ios_icons.sh
#!/bin/sh
SRC=$1
EXT=`basename $SRC | sed -e 's/^.*\.\(.*\)$/\1/'`
SIZES='iTunesArtwork_512x512 iTunesArtwork@2x_1024x1014 Icon-60@2x_120x120 Icon-60@3x_180x180 Icon-57_57x57 Icon-57@2x_114x114 Icon-29_29x29 Icon-29@2x_58x58 Icon-29@3x_87x87 Icon-40@2x_80x80 Icon-40@3x_120x120 Icon-76_76x76 Icon-76@2x_152x152 Icon-72_72x72 Icon-72@2x_144x144 Icon-50_50x50 Icon-50@2x_100x100'
for s in $SIZES; do
OPT=`echo $s | sed -e 's/^\(.*\)_\(.*\)$/\2 \1/'`
convert $SRC -resize ${OPT}.${EXT}
done
@koshian
koshian / init-rubygems.sh
Created Oct 2, 2015
After install new ruby
View init-rubygems.sh
#!/bin/sh
REQUIRE_GEMS='
rbenv-rehash
bundler
nokogiri
myrurema
fastri
deep_hash_transform
rails
cocoapods
View hb.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
uri = 'http://b.hatena.ne.jp/hotentry'
query = '#main h3 a'
doc = Nokogiri::HTML.parse(open(uri).read)
doc.search(query).each do |e|
View scrape.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'
require 'nokogiri'
uri = ARGV[0]
query = ARGV[1]
doc = Nokogiri::HTML.parse(open(uri).read)
doc.search(query).each do |e|
You can’t perform that action at this time.