Skip to content

Instantly share code, notes, and snippets.

@JunichiIto
JunichiIto / alias_matchers.md
Last active March 27, 2024 09:46
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active March 20, 2024 18:46
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@sugyan
sugyan / fizzbuzz.pl
Last active September 21, 2023 08:49
"^ "
=~ (
("(").("~"^"."^"^"^(""=="")."").("^"
^"="^(""=="").""^")").("^"^".").("="
^"~"^(""=="")."").("("^(""=="^").""^
"."^"^").("("^(""=="").""^"^"^")").(
(" ^( "
== "
") .
"" ^
@hitode909
hitode909 / lgtm
Created October 22, 2013 06:42
ランダムなLGTMをクリップボードにコピーするやつ
#! /usr/bin/env ruby
# Copy random LGTM to clipboard
require 'open-uri'
require 'nokogiri'
require 'shellwords'
doc = Nokogiri open('http://www.lgtm.in/g')

概要

  • エアロバイクが壊れたので、対応を検討した。

  • 保障期間の1年以内だったが、修理に時間が掛かるので、新しいのに買い換えた。

  • 壊れたのは、粗大ゴミとして出す申し込みをした。

  • エアロバイク

    • 壊れたやつ: アルインコAFB4010
  • 新しいやつ: 上記と同じの

@matope
matope / Cassandra - A Decentralized Structured Storage System.markdown
Created July 23, 2012 09:56
Cassandra - A Decentralized Structured Storage System[和訳]
@tatsuru
tatsuru / parse.rb
Last active February 1, 2016 08:22
ec2 RI parser
#!/usr/bin/env ruby
require 'json'
def parse(uri)
JSON.parse `curl -s #{uri}`.gsub("/*\n * This file is intended for use only on aws.amazon.com. We do not guarantee its availability or accuracy.\n *\n * Copyright 2014 Amazon.com, Inc. or its affiliates. All rights reserved.\n */\ncallback({",'{').gsub("\);", '').gsub(/([a-zA-Z]+):/, '"\1":')
end
puts %w(
region
#!/usr/bin/env ruby
Dir.chdir(File.dirname(__FILE__))
require 'digest/sha2'
require 'uri'
require 'open-uri'
require 'json'
API_KEY = 'api_key'
TUMBLELOG = 'scrap.sorah.jp'
# -*- coding:utf-8 -*-
class String
def kaibun
self + self[0..-2].reverse
end
end
@inao
inao / markdown2inao.pl
Last active October 2, 2015 19:19 — forked from suzuki/markdown2inao.pl
GitHubに移行しました。 https://github.com/naoya/md2inao.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
use Encode;