This file contains 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
var gplusoneLoaded = false; | |
// gplus | |
var $gplus = $('#somewhere'); // the src is like <div id="somewhere"><!-- put plus button here! --></div> | |
if($gplus.size()){ | |
window.___gcfg = {lang: 'ja'}; | |
$gplus.html('<div class="g-plusone" data-size="medium" data-href="' + window.location.href + '"></div>'); | |
if(!gplusoneLoaded){ | |
gplusoneLoaded = true; | |
$.getScript("https://apis.google.com/js/plusone.js"); |
This file contains 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
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] |
This file contains 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
"--------------------------------------------------------------------------- | |
" tab setting toggle macro | |
fun! g:Ind2sp() | |
setlocal softtabstop=2 | |
setlocal shiftwidth=2 | |
setlocal expandtab | |
endfun | |
fun! g:Ind4sp() | |
setlocal softtabstop=4 |
This file contains 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
var proc = require('child_process'); | |
config.init({ | |
lint: { | |
files : [ 'hoge.js', 'fuga.js' ] | |
}, | |
concat: { | |
'all.js' : [ 'hoge.js', 'fuga.js', 'cofall.js', '_coftemp.js' ] | |
}, |
This file contains 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
# ================================================================== | |
# Cakefile - compile, concatenate, minify coffee | |
# ================================================================== | |
# ├─ Cakefile | |
# ├─ lib | |
# │ ├─ all.js | |
# │ └─ all.min.js | |
# └─ src | |
# ├─ fuga.coffee | |
# └─ hoge.coffee |
This file contains 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
# ================================================================== | |
# Cakefile - compile, concatenate, minify coffee | |
# ================================================================== | |
# ├─ Cakefile | |
# ├─ lib | |
# │ ├─ all.js | |
# │ └─ all.min.js | |
# └─ src | |
# ├─ fuga.coffee | |
# └─ hoge.coffee |
This file contains 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
{print} = require 'util' | |
{spawn} = require 'child_process' | |
task 'build', 'Build lib/ from src/', -> | |
coffee = spawn 'coffee', ['-c', '-o', 'lib', 'src'] | |
coffee.stderr.on 'data', (data) -> | |
process.stderr.write data.toString() | |
coffee.stdout.on 'data', (data) -> | |
print data.toString() | |
coffee.on 'exit', (code) -> |
This file contains 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
(function() { | |
var SomeUI; | |
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
SomeUI = (function() { | |
function SomeUI($el) { | |
this.$el = $el; | |
this.$content = $el.find('.content'); | |
this.$button1 = $el.find('.button1'); | |
this.$button2 = $el.find('.button2'); | |
this._eventify(); |
This file contains 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
$.widget('mod.hoge', { | |
_create: function(){ | |
alert('this method will be called first'); | |
this.method1(); | |
this.method2(); | |
this.method3(); | |
}, | |
method1: function(){ | |
... | |
}, |
This file contains 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
<div class="mod-oremodule"> | |
<div class="mod-oremodule-hd"> | |
<h1>ore module</h1> | |
</div> | |
<div class="mod-oremodule-bd"> | |
<p class="mod-oremodule-bd-p">hogehoge</p> | |
<p class="mod-oremodule-bd-footnote">hogepuyo</p> | |
</div> | |
</div> |