Skip to content

Instantly share code, notes, and snippets.

View monsat's full-sized avatar

TANAKA Kohji monsat

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>CSS Fizz Buzz</title>
<link rel="stylesheet" href="./main.css">
</head>
<body>
<h1>CSSだけでFizzBuzzしよう</h1>
<h2>ルール</h2>
<ul>
@monsat
monsat / plain.vsscript.json
Created March 10, 2014 03:31
VideoShaderのPlainフィルタです(笑)
{
"title" : "Plain",
"pipeline" : [
]
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos64_ja"
config.vm.box_url = "https://dl.dropboxusercontent.com/u/3657281/centos64_ja.box"
config.vm.hostname = "vagrant-test.local"
@monsat
monsat / footer.html
Created May 13, 2014 02:00
外部ドメインの場合は自動的に target=_blank を付与する(はてなブログ等で使用)
@monsat
monsat / app_email.php
Created April 14, 2010 07:15 — forked from nojimage/app_email.php
CakePHP version 1.3.x EmailComponent for Japanese
<?php
/**
*
* AppEmailComponent (for Japanese)
*
* Copyright 2010, nojimage (http://php-tips.com/)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
@monsat
monsat / jquery.pluginname.js
Created July 16, 2011 05:34
initial of jquery plugin
(function($) {
$.fn.pluginname = function(options) {
// build main options before element iteration
var opts = $.extend({}, $.fn.pluginname.defaults, options);
opts.debug && debug(this);
// iterate and reformat each matched element
return this.each(function() {
$this = $(this);
});
};
@monsat
monsat / change_mode_of_tmp.sh
Created August 4, 2011 02:39
Change mode of tmp dir on CakePHP
#!/bin/sh
cd /path/to/your_app_root
# ls
# cake app ...
find app/tmp -type d -exec chmod 0777 {} \;
@monsat
monsat / delete_cache.sh
Created August 4, 2011 02:33
delete all cache files on CakePHP's app
#!/bin/sh
cd /path/to/your_app_root
# ls
# cake app ...
find ./*/tmp/cache -type f \( -name 'cake_*' -o -name 'element_*' -o -name '*.*' \) -exec rm {} \;
@monsat
monsat / gist:1133729
Created August 9, 2011 10:36
pagination with query string by CakePHP2.0
# AnyController.php
var $paginate = array(
'paramType' => 'querystring',
);
@monsat
monsat / gist:1143625
Created August 13, 2011 08:35
"git log-all" is command for viewing logs with branch tree
# via http://d.hatena.ne.jp/yukioc/20090920/1253413686
git config --global alias.log-all "log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'"