A Pen by SENDA Keijiro (千田啓次郎) on CodePen.
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
Show hidden characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"Better CoffeeScript", | |
"ConvertToUTF8", | |
"CTags", |
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
pear channel-update pear.php.net | |
pear clear-cache | |
# PHPCS newest version is 2.x, but CakePHP_CodeSniffer requies version >= 1.4, version <= 1.5 | |
# (you must type `pear uninstall PHP_CodeSniffer` at first if above 2.x is installed) | |
pear install -n PHP_CodeSniffer-1.5.6 | |
pear channel-discover pear.cakephp.org | |
pear install -n cakephp/CakePHP_CodeSniffer |
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
if !ARGV[0] || !ARGV[1] || ARGV[1] !~ /\d+/ | |
puts <<-USAGE | |
Usage: ruby anagram.rb <word> <num> | |
Example: ruby anagram.rb Thelonious 5 | |
USAGE | |
exit | |
end | |
str = ARGV[0] | |
trial = ARGV[1].to_i |
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
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable |
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
javascript:(function(){_readableOptions={'text_font':'Meiryo, Helvetica, quote(Helvetica Neuve), Arial, Tahoma, sans-serif','text_font_monospace':'quote(Courier New), Courier, monospace','text_font_header':'Meiryo, quote(Palatino Linotype), Palatino, quote(Book Antigua), Georgia, serif','text_size':'2rem','text_line_height':'1.5','box_width':'90%','color_text':'#FFFFFF','color_background':'#2D2D2D','color_links':'#99CCFF','text_align':'normal','base':'blueprint','custom_css':'h1, h2, h3, h4, h5, h6, p, pre, tr, li { transition: background 0.1s ease-in;}h1 { border-style:double; border-width:4px 0; border-color:#fff; padding:2rem 1rem; text-align:center !important; }h3 { border-bottom:1px solid #fff;}h4 { border-left:8px solid #fff; padding-left:0.5rem;}h1:hover,h2:hover,h3:hover,h4:hover,h5:hover,h6:hover,p:hover,pre:hover,tr:hover,li:hover,caption:hover { background: #35a;}pre {overflow: scroll; border: 1px solid #999; padding: 0.5rem; background: #126;}'};if(document.getElementsByTagName('body').length>0);e |
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
# mysql_1000k/recipes/client.rb | |
# Install MySQL Client. | |
include_recipe 'mysql_1000k::mysql_repo' | |
yum_package 'mysql-community-client' |
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
# see: https://gist.github.com/turtlebender/2050259 | |
# see: http://stackoverflow.com/questions/14518236/vagrant-how-to-get-hostonly-ip-adress-from-within-chef-recipe | |
provide "ipaddress" | |
require_plugin "#{os}::network" | |
ipaddress network['interfaces']['eth1']['addresses'].detect{|k,v| v['family'] == "inet" }.first |
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
// ==UserScript== | |
// @name Hide Yahoo News Comments | |
// @namespace http://headlines.yahoo.co.jp/ | |
// @version 0.1 | |
// @description Hide 'Yahoo! news' comments. | |
// @match http://headlines.yahoo.co.jp/* | |
// @copyright 2014, SENDA Keijiro | |
// ==/UserScript== | |
function addJQuery(callback) { |
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
/** | |
* 画像の実際のサイズを取得する | |
* | |
* @param string image img要素 | |
*/ | |
function getActualDimension(image) { | |
var run, mem, w, h, key = "actual"; | |
// for Firefox, Safari, Google Chrome | |
if ("naturalWidth" in image) { | |
return {width: image.naturalWidth, height: image.naturalHeight}; |