Skip to content

Instantly share code, notes, and snippets.

" Ggisty
" just grep the gist directory.
" needs gisty to use this. see the pages below.
" http://d.hatena.ne.jp/swdyh/20081207/1228655198
" TODO: needs to handle 'No match' error
"
" write the code to .vimrc to define gists root dir
"
"let g:ggistyRootPath = '~/dev/gists'
"
-- tell application "iTerm"
-- tell the first terminal
-- tell the last session
-- set cmd to "cd /temp/"
-- write text cmd
-- end tell
-- end tell
-- end tell
-- tell application "Finder"
-- if exists process "iTerm" then
" =======================================================
"
" File: open_termina_custom.vim
"
" This file was modified by Takazudo. (takazudo[at]gmail.com)
" This opens iTerm instead of Terminal in Mac.
"
" referred web sites:
" http://iterm.sourceforge.net/scripting.shtml
" http://devilelephant.blogspot.com/2007/08/os-x-finder-iterm-applescript-window.html
/**
* $.ua
* iPhone, iPad, iPod detection
*/
$.ua = (function(){
var o = {};
var ua = navigator.userAgent;
$.each(['iPhone', 'iPod', 'iPad'], function(i, current){
o[current] = Boolean(ua.match(new RegExp(current, 'i')));
o.appleDevice = o.appleDevice || o[current];
/*!
* $.fn.isInWindow
*
* version 0.0.1 (2010/11/17)
* author: Takeshi Takatsudo (takazudo[at]gmail.com)
* license: MIT
* depends: jQuery 1.4.4
*/
(function($, undefined){ // start encapsulation
@Takazudo
Takazudo / kotaroclearfix.css
Created May 13, 2011 01:55 — forked from kotarok/my clearfix
the clearfix I'm currently using
/* kotaroclearfix */
.clearfix { *zoom: 1; }
.clearfix:after { content: ''; display: block; clear : both; height: 0; }
@media print { .clearfix:after { height: 1px; margin-bottom: -1px; visibility: hidden; } }
<!-- title: emptyhtmltemplate -->
<!doctype html>
<html class="no-js" lang="ja">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
@Takazudo
Takazudo / css3-property-duplicate
Created May 15, 2011 02:20 — forked from edom18/css3-property-duplicate
CSSのプロパティを、ベンダープレフィクス付きで複製するスクリプト。(インデントも引き継ぐよう修正)
function! CSS3PropertyDuplicate()
let reg_save = @@
silent normal Y
let css3 = @@
let ind = matchlist(css3, '\v(\s*)(.*)')
let webkit = ind[1] . "-webkit-" . ind[2]
let moz = ind[1] . "-moz-" . ind[2]
let ms = ind[1] . "-ms-" . ind[2]
let o = ind[1] . "-o-" . ind[2]
// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
log.history = log.history || []; // store logs to an array for reference
log.history.push(arguments);
if(this.console) {
arguments.callee = arguments.callee.caller;
console.log( Array.prototype.slice.call(arguments) );
}
};
/**
* browser sinffing
* http://james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
*/
(function(){
var ie = (function(){
var undef,
v = 3,
div = document.createElement('div'),