Skip to content

Instantly share code, notes, and snippets.

@1000k
1000k / hideHateSpeeches.js
Last active January 4, 2016 04:48
Yahoo! ニュースのヘイトスピーチだらけで見るに堪えないコメント欄を非表示にする Greasemonkey スクリプト。 Chrome の Tempermonkey で動作確認済み。 参考: https://gist.github.com/eristoddle/4440713
// ==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) {
@1000k
1000k / override_ipaddress.rb
Created April 21, 2014 06:20
Ohai plugin to correct ipaddress specified in Vagrantfile.
# 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
@1000k
1000k / client.rb
Last active August 29, 2015 14:01
Enable official MySQL reporisoty & install MySQL Community Server using Chef. ref: http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
# mysql_1000k/recipes/client.rb
# Install MySQL Client.
include_recipe 'mysql_1000k::mysql_repo'
yum_package 'mysql-community-client'
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
@1000k
1000k / install_google_chrome.sh
Last active August 29, 2015 14:01
Install Google Chrome in Ubuntu 14.0.4. (ref: [Laboratory of Theoretical Medicinal Chemistry & Drug Design Department of Chemistry, Rikkyo (St. Paul's) University](http://www2.rikkyo.ac.jp/web/tokiwa/menu/bioLib/other_software/chrome/chrome.html))
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
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
@1000k
1000k / Install_PHP_CodeSniffer_and_CakePHP_Rule.sh
Last active August 29, 2015 14:19
Install PHP_CodeSniffer rule for CakePHP 2.x
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
@1000k
1000k / Package Control.sublime-settings
Last active February 18, 2016 14:42
Sublime Text 3 Preference
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Better CoffeeScript",
"ConvertToUTF8",
"CTags",
@1000k
1000k / Pure CSS3 Hamburgar Menu + Slide Menu.markdown
Created August 3, 2015 05:56
Pure CSS3 Hamburgar Menu + Slide Menu
@1000k
1000k / Pure CSS3 image gallery with Flexbox (responsive).markdown
Last active March 9, 2021 00:55
Pure CSS3 image gallery with Flexbox (responsive)