Skip to content

Instantly share code, notes, and snippets.

[mysqld]
slow_query_log
slow_query_log-file = /var/log/mysql/mysql-slow.sql
long_query_time = 5
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
max_allowed_packet=300M
@wataru420
wataru420 / 0_reuse_code.js
Created April 19, 2014 06:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@wataru420
wataru420 / Vagrant
Created November 1, 2013 13:39
Vagrantでホストマシーンとクライアントマシーンの時間を同期させない方法 ref: http://qiita.com/wataru420/items/6441b69ec5fb90743fd1
config.vm.provider :virtualbox do |vb|
vb.customize ["setextradata", :id, "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled", 1]
end
@wataru420
wataru420 / file0.txt
Last active March 23, 2016 05:18
gitの特定のディレクトリをブランチ毎別リポジトリにする方法 ref: http://qiita.com/wataru420/items/f1eb7cf37fe5ba4980c3
mkdir ~/subproject
@wataru420
wataru420 / file0.txt
Created June 26, 2013 02:44
freemarkerでMapのデータを回す2+1の方法 ref: http://qiita.com/wataru420/items/08b9bc2b55a52293c824
<#assign h = {"name":"mouse", "price":50}>
@wataru420
wataru420 / config.rb
Created May 31, 2013 02:49
Compassを使った環境ごとの画像URLの書き換え ref: http://qiita.com/items/fd5ee4764a4049da4619
css_dir = "src/main/webapp/css/"
sass_dir = "src/main/webapp/scss/"
images_dir = "src/main/webapp/"
output_style = :compressed
DEV= 'http://dev.stat.example.jp/hoge/'
PRD = 'http://stat.example.jp/hoge/'
http_images_path = (environment == :production) ? PRODUCT : STAGING
@wataru420
wataru420 / file0.sql
Created May 29, 2013 04:50
MySQLでロックしたときの確認用SQL ref: http://qiita.com/items/29325eda5f7360b200fe
select t_b.trx_mysql_thread_id blocking_id,
t_w.trx_mysql_thread_id requesting_id,
p_b.HOST blocking_host,
p_w.HOST requesting_host,
l.lock_table lock_table,
l.lock_index lock_index,
l.lock_mode lock_mode,
p_w.TIME seconds,
p_b.INFO blocking_info,
p_w.INFO requesting_info
@wataru420
wataru420 / HogeService.java
Created October 24, 2012 12:33
jMokitを使ってプライベートなフィールドにあくせすしたり
public class HogeService {
private static StringBuilder buffer;
private static char static1;
private static char static2;
private int intField;
private int intField2;
private String stringField;
private List<String> listField;
@wataru420
wataru420 / action.java
Created October 9, 2012 15:36
iOS6はnoCacheだよ!
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);