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
# Twitpic downloader with Ruby | |
# | |
# This tool enables you to save all your twitpic full-size images. | |
# Confirmed this tool working with Ruby 2.1.2. | |
# | |
# Usage | |
# $ mkdir work_dir | |
# $ ruby twitpic_downloader.rb user_name work_dir | |
# | |
# MIT License |
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 "date" | |
def this_year | |
( ARGV[0] || DateTime.now.year ).to_i | |
end | |
def leap_year? | |
Date.new(this_year).leap? |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> | |
<title>お探しのページが見つかりませんでした</title> | |
<?php get_template_part( 'analytics' ); // create analytics.php template file or delete this line. ?> | |
</head> | |
<body> | |
<div> |
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
javascript:var%20url=location.href;var%20word=url.match(/(#q=|search\?q=|&q=)(.*?)($|&)/)[2];var%20subw=window.open('https://www.google.co.jp/webhp?tbm=blg#tbm=blg&q='+word).document; |
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
import Foundation | |
class Regexp { | |
let internalRegexp: NSRegularExpression | |
let pattern: String | |
init(_ pattern: String) { | |
self.pattern = pattern | |
var error: NSError? | |
self.internalRegexp = NSRegularExpression( pattern: pattern, options: NSRegularExpressionOptions.CaseInsensitive, error: &error)! |
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
### https://raw.github.com/github/gitignore/2f7c4e80629d1b02c9e1bce9fc54628ed620d2d6/swift.gitignore | |
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ | |
DerivedData/ |
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
javascript:var now = new Date(); var day_offset = 1; if (now.getDay() === 1) { day_offset = 3 }; var yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - day_offset); var prev_date = String(yesterday.getFullYear()) + String(('0' + (yesterday.getMonth() + 1)).slice(-2)) + String(('0' + yesterday.getDate()).slice(-2)); var url = `https://info.finance.yahoo.co.jp/fx/marketcalendar/?d=${prev_date}&c=ALL&i=0`; window.location.href = url; |