This file contains hidden or 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
tell application "Google Chrome" to set the bounds of the front window to {0, 0, 728, 546} |
This file contains hidden or 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
#!/bin/sh | |
git subtree push --prefix demo/ origin gh-pages |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'fileutils' | |
Dir.glob('content/archives/*.md').each do |filename| | |
content = File.open(filename).read; | |
content = content.gsub('<pre class="prettyprint">', '<pre><code>') | |
content = content.gsub('</pre>', '</code></pre>') | |
File.binwrite(filename, content) |
This file contains hidden or 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
/*! Table Expander jQuery Plugin | (c) 2014 rakuishi | MIT license */ | |
;(function($) { | |
$.fn.tableExpander = function(options) { | |
var defaults = { | |
'expandClassName' : 'expand', | |
'backgroundColor' : 'transparent', | |
'hoverBackgroundColor' : '#f0f0f0', | |
}; | |
var setting = $.extend(defaults, options); |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# $ ruby tinypng.rb drawable/ | |
require 'fileutils' | |
require 'net/https' | |
require 'uri' | |
API_KEY = '***' | |
i_dir = ARGV[0] |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# $ ruby wp-xml-hugo-import.rb ***.wordpress.yyyy-mm-dd.xml | |
require 'fileutils' | |
require 'time' | |
require 'rexml/document' | |
include REXML | |
class Time | |
def timezone(timezone = 'UTC') |
This file contains hidden or 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
<?php | |
require_once(dirname(__file__) . "/twitteroauth/twitteroauth.php"); | |
date_default_timezone_set('Asia/Tokyo'); | |
define('TWITTER_CONSUMER_KEY', '***'); | |
define('TWITTER_CONSUMER_SECRET', '***'); | |
define('TWITTER_ACCESS_TOKEN', '***'); | |
define('TWITTER_ACCESS_TOKEN_SECRET', '***'); | |
// https://dev.twitter.com/rest/reference/get/friends/list |
This file contains hidden or 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
<?php | |
// データベース接続 | |
mysql_connect('localhost', 'root', 'root'); | |
mysql_select_db('database'); | |
mysql_query('SET NAMES UTF8'); | |
// テーブルが存在しない場合は作成する | |
if (mysql_query('SELECT 1 FROM kurage') == FALSE) { | |
$sql = "CREATE TABLE kurage (id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name TEXT, sort INT UNSIGNED)"; |
This file contains hidden or 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
// | |
// UIView+EasyRectMake.m | |
// | |
// Created by OCHIISHI Koichiro on 2012/10/25. | |
// | |
// | |
#import "UIView+EasyRectMake.h" | |
@implementation UIView (EasyRectMake) |