Skip to content

Instantly share code, notes, and snippets.

View soramugi's full-sized avatar
🦭
I always want to lie down

Y.Tsuyuzaki soramugi

🦭
I always want to lie down
View GitHub Profile
@gongo
gongo / Gemfile
Last active February 14, 2018 22:14
Capybara の稼働状況を animation gif として保存するようなやつ
source 'https://rubygems.org'
gem 'capybara'
gem 'rake'
gem 'selenium-webdriver'
gem 'json'
gem 'rmagick'
@Gab-km
Gab-km / whyILeftHeroku.rst
Last active December 30, 2022 10:56
何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

原著者

Adrian Holovaty

原文

Why I left Heroku, and notes on my new AWS setup

金曜日、私は Heroku から Amazon Web Services(AWS) を直接使うように Soundslice を移行しました。私はこの変更ができてとても、そうとても嬉しくて、私がどうやったかということと、もし皆さんが同じような立場だったら何故それを検討すべきかということについて広く伝えたいと思います。

@matchy256
matchy256 / makepodcast.rb
Last active January 21, 2024 22:13
指定ディレクトリ内のmp3ファイルから必要最低限のPodcast用RSSを生成する
#!/usr/bin/env ruby
require 'time'
require 'nkf'
abort "Usage:#{$0} PodcastTitle PublicURL FilesDir" if ARGV.length < 3
title = NKF.nkf('-w', ARGV[0])
location = ARGV[1]
filesDir = ARGV[2]
@STAR-ZERO
STAR-ZERO / gist:5335577
Last active December 15, 2015 22:49
HomebrewでMySQLのバージョンを指定して入れる

HomebrewでMySQLのバージョンを指定して入れる

$ cd /usr/local
$ brew versions mysql
5.6.10   git checkout aa3db07 Library/Formula/mysql.rb
5.5.29   git checkout 336c976 Library/Formula/mysql.rb
5.5.28   git checkout 5825f62 Library/Formula/mysql.rb
5.5.27   git checkout 93aecfa Library/Formula/mysql.rb
5.5.25a git checkout faaa6c1 Library/Formula/mysql.rb
require 'RMagick'
require 'capybara'
require 'launchy'
module Capybara::Recording
def start_recording
system "rm -f tmp/*"
end
def save_recording
@rummelonp
rummelonp / homebrew_sushi.patch
Created February 14, 2013 10:52
Homebrew インストール後に寿司表示するやつ
diff --git Library/Homebrew/formula_installer.rb Library/Homebrew/formula_installer.rb
index 1008bc2..3cf2492 100644
--- Library/Homebrew/formula_installer.rb
+++ Library/Homebrew/formula_installer.rb
@@ -236,7 +236,7 @@ class FormulaInstaller
ohai "Summary" if ARGV.verbose? or show_summary_heading
unless ENV['HOMEBREW_NO_EMOJI']
- print "🍺 " if MacOS.version >= :lion
+ print "🍣 " if MacOS.version >= :lion
@monde
monde / .gitignore
Last active February 19, 2020 19:02
Micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.
Gemfile.lock
@rummelonp
rummelonp / suddenize
Last active December 11, 2015 06:08
突然の死
#!/usr/bin/env bash
function suddenize() {
typeset text hit length i header footer
text=$1
hit=0
for i in $( seq 1 ${#text} ); do
hit=$(( $hit + $(expr $text[$i] : '[ -~]') ))
done
length=$(( ${#text} - $(( $hit / 2 )) + 2 ))
@mikeda
mikeda / gist:4406576
Last active December 30, 2020 14:34
GrowthForecastでAPIを使って複合グラフを作るサンプル
#!/usr/lib64/fluent/ruby/bin/ruby
# -*- encoding: utf-8 -*-
# GrowthForecastのAPIを使って複合グラフを作るサンプル
# 仕様はこのへん読もう
# https://github.com/kazeburo/GrowthForecast/blob/master/lib/GrowthForecast/Web.pm
#
# <service_name>/access/{2xx_count,3xx_count,4xx_count,5xx_count}
# ↓
# <service_name>/access/access_status
@ntotani
ntotani / tweetZombie.coffee
Created September 6, 2012 14:10
tweet message by Zombie.js
Browser = require "zombie"
username = process.argv[2]
password = process.argv[3]
message = process.argv[4]
browser = new Browser (debug:true, runScripts:false)
browser.visit "https://mobile.twitter.com/session/new", ->
browser.fill "username", username
browser.fill "password", password