This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Kernel | |
def p(arg) | |
BubbleWrap.p(arg) if RUBYMOTION_ENV != 'release' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TagList | |
private | |
def TagList | |
'hoge' | |
end | |
end | |
class Hoge | |
include TagList | |
def some_method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
************************************************************************ | |
IMPORTANT! Nokogiri builds and uses a packaged version of libxslt. | |
If this is a concern for you and you want to use the system library | |
instead, abort this installation process and reinstall nokogiri as | |
follows: | |
gem install nokogiri -- --use-system-libraries | |
If you are using Bundler, tell it to use the option: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage | |
# $ ruby sougo_follow.rb satococoa | |
# follower_ids も friend_ids も rate_limit が厳しいので注意 | |
require 'bundler/setup' | |
Bundler.require | |
screen_name = ARGV[0] | |
client = Twitter::REST::Client.new do |config| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/a/9084784 | |
#import <Foundation/Foundation.h> | |
@interface NSData (NSData_Conversion) | |
#pragma mark - String Conversion | |
- (NSString *)hexadecimalString; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development do | |
gem 'spring' | |
gem 'foreman', require: false | |
gem 'guard-minitest' | |
gem 'view_source_map' | |
gem 'quiet_assets' | |
gem 'binding_of_caller' | |
gem 'better_errors' | |
gem 'bullet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Webページからリンクされているjpg, gif, pngをカレントディレクトリにダウンロード | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
require 'uri' | |
urls = ARGV | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# 空のディレクトリの中に空のファイルを作る | |
# gitなどのお供に | |
require 'pathname' | |
if ARGV[0] =~ /-{1,2}h+/ | |
puts 'example) ruby mkblank.rb -v /path/to/dir filename' | |
exit | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/local/bin/perl | |
# Webページからリンクの張られた画像をカレントディレクトリにダウンロード(perl+regexp版) | |
use strict; | |
use warnings; | |
require LWP::UserAgent; | |
my @urls = @ARGV; | |
my $ua = LWP::UserAgent->new; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
require "open-uri" | |
require "mechanize" | |
module Sitemap | |
class UriList | |
def initialize |
OlderNewer