Skip to content

Instantly share code, notes, and snippets.

View shokai's full-sized avatar

Sho Hashimoto shokai

View GitHub Profile
@naniwaKun
naniwaKun / tw_client_stream.rb
Last active August 20, 2017 03:59
tw クライアントのソース変更の提案 ref.https://twitter.com/naniwa_stg/status/881834161757081601
module Tw
class Client::Stream
def initialize(user=nil)
user = Tw::Auth.get_or_regist_user user
@client = Twitter::Streaming::Client.new do |config|
config.consumer_key = Conf['consumer_key']
config.consumer_secret = Conf['consumer_secret']
config.access_token = user['access_token']
config.access_token_secret = user['access_secret']
class MdFormatter {
renderNode (node) {
if (typeof node === 'string') {
return node
} else if (node instanceof Array) {
let result = ''
node.forEach((item) => {
result += this.renderNode(item)
})
return result
@hitode909
hitode909 / hamuo
Created May 14, 2014 10:27
はむお
#!/usr/bin/env ruby
puts "🐹 < #{ ARGV.empty? ? ARGF.read : ARGV.join(' ') }"
@ybenjo
ybenjo / README.md
Last active December 13, 2023 08:04 — forked from yagays/agqr.rb
save AGQR radio programs.

agqr.rb

これは何

AGQR の放送を保存するスクリプト.

fork 元との違いは

yagays / agqr.rb には

  • 31日まである月に翌日の指定が失敗する

というバグが存在する.

{jspack} = require 'jspack'
module.exports = class Asearch
INITPAT = 0x80000000
MAXCHAR = 0x100
isupper: (c) ->
return (c >= 0x41) and (c <= 0x5a)
@geta6
geta6 / scrape.class.coffee
Last active December 21, 2015 06:48
アニメデータベースをパースします
fs = require 'fs'
util = require 'util'
http = require 'http'
async = require 'async'
{Iconv} = require 'iconv'
cheerio = require 'cheerio'
multimeter = require 'multimeter'
multi = multimeter process
class AnimeWiki
@geta6
geta6 / .zshrc
Last active December 16, 2015 20:29
zshでCommandNotFoundにhookするスクリプトできたよー^O^ノ
preexec () {
[[ -z "`whence ${1%% *}`" ]] && echo "NOTFOUND!!! ${1%% *}"
}
# ---- #
preexec () {
cmd=${1%% *}
if [ -z "`whence ${cmd}`" ]; then
if [ $cmd = 'yabai' ]; then
@hakobe
hakobe / main.md
Last active December 20, 2018 04:44
Kyoto.js #7 何がMVCをつなげているのか

何がMVCをつなげているのか

クライアントサイドMVC

  • buzzwordっぽい
  • Backbone.js Angular.js Knockout.js Ember.js とか
  • 使ってますか?
    • はてなでも一部本番運用/社内向けツールではよくみる
  • クライアントサイドMVCフレームワークを利用するとMVCによる設計方針を簡単に使うことができるようになる
@thbar
thbar / how-to-diff-pdf-files-with-git-and-diffpdf.md
Last active January 22, 2025 13:30
How to diff PDF files with Git

One can use MD5 or plain text diff to see differences in PDF files. If that's not enough, here's how to use diff-pdf which knows how to diff based on appearance or words:

  • brew install diff-pdf
  • edit your ~/.gitconfig to add this:
[difftool "diffpdf"]
  cmd = diff-pdf --view \"$LOCAL\" \"$REMOTE\"