Skip to content

Instantly share code, notes, and snippets.

View yasulab's full-sized avatar
💎
\\ Rubyist! //

Yohei Yasukawa yasulab

💎
\\ Rubyist! //
View GitHub Profile
@yasulab
yasulab / simple_comment_viewer.rb
Last active December 18, 2015 10:59
Simple Comment Viewer for ScreenX TV ( http://screenx.tv/ ) なお、投稿にも対応した本格的コメントビューワーはこちらです: https://github.com/aki-017/screenx-commentviewer
#! /usr/bin/env ruby
# -*- coding: utf-8 -*-
### Settings
# 1. To use SocketIO, type the following:
# $ gem install socketio-client
require "SocketIO"
# 2. Tune to your channel
# Ex. http://screenx.tv/#{channel}
@nicolashery
nicolashery / environment-variables-jekyll-templates.md
Last active January 22, 2023 15:56
Make environment variables available in Jekyll Liquid templates

Environment variables in Jekyll templates

This is one way to pass some data (API tokens, etc.) to your Jekyll templates without putting it in your _config.yml file (which is likely to be committed in your GitHub repository).

Copy the environment_variables.rb plugin to your _plugins folder, and add any environment variable you wish to have available on the site.config object.

In a Liquid template, that information will be available through the site object. For example, _layouts/default.html could contain:

@akiyan
akiyan / transcribed-the-miyagawas-podcast-ep1.md
Last active December 14, 2015 01:59
Tatsuhiko Miyagawa's Podcast ep1 の文字起こしです。 http://podcast.bulknews.net/post/42992556069/podcast-ep1

最近ブログ書いてますよね #00:00:00.0#

miyagawa naoyaさん、最近は結構ブログが活発になってきている感じですね。
naoya はいはい、そうですよね。
miyagawa なんか、心境の変化があったんですか。
naoya 心境の変化(笑)
miyagawa (笑)
naoya いやずっとドラクエしかしてなかったんですけど(笑)

@yasulab
yasulab / README.md
Created February 18, 2013 08:33
Broadcast your terminal to the world using ScreenX TV

Screenshot

ScreenX TV is a web service that lets you broadcast your terminal to the world. It is often used for a hackathon, lecture, and opensource activity. And this gist explains how to broacdcast your terminal using it.

1. Preparation

To install screenxtv command, you can broadcast your terminal anytime, and there are two ways, Ruby and GCC. In both ways, you need to use screen before installing screenxtv command.

To install screenx

@Gab-km
Gab-km / github-flow.ja.md
Last active April 23, 2025 04:19 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@keikubo
keikubo / stripe_webpay_gem.diff
Created September 11, 2012 04:25
Diff between Stripe gem and Webpay gem.
diff --git a/lib/stripe.rb b/lib/stripe.rb
index fb4a6a6..7e77804 100644
--- a/lib/stripe.rb
+++ b/lib/stripe.rb
@@ -46,7 +46,7 @@ require 'stripe/errors/authentication_error'
module Stripe
@@ssl_bundle_path = File.join(File.dirname(__FILE__), 'data/ca-certificates.crt')
@@api_key = nil
- @@api_base = 'https://api.stripe.com/v1'
+ @@api_base = 'https://api.webpay.jp/v1'
@jugyo
jugyo / gist:3509080
Created August 29, 2012 09:32
とあるプロジェクトで使ったライブラリたち

とある Rails プロジェクトで使ったライブラリたち

  • carrierwave - ファイルアップロードを処理するやつ
  • carrierwave_backgrounder - アップロードされたフィアルの処理(画像のリサイズ等)をバックグラウンドで処理する
  • delayed_job_active_record - バックグラウンド処理
  • fog - AWS との連携に使う。 carrierwave がこれを使って S3 にファイルを保存してくれたりする
  • haml-rails - haml 使いたいねん
  • twitter-bootstrap-rails - あれ
  • will_paginate - ページネーション
  • bootstrap-will_paginate - twitter-bootstrap 的にいい感じのタグを出力してくれる
@colrichie
colrichie / parsrc.sh
Last active September 14, 2017 09:00
[MOVED] CSV & JSON & XML file scraping tools
#! /bin/sh
#
# parsrc.sh
# CSV(Excel形式(RFC 4180):ダブルクォーテーションのエスケープは"")から
# 行番号列番号インデックス付き値(line field indexed value)テキストへの正規化
# (例)
# aaa,"b""bb","c
# cc",d d
# "f,f"
# ↓
@judofyr
judofyr / fizzbuzz.rb
Created August 1, 2012 21:37 — forked from JEG2/fizzbuzz.rb
Writing FizzBuzz with flip-flops
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
?\n
end