'your text'.wrap('[]'); // [your text]
'your text'.wrap('<li></li>'); // <li>your text</li>
'your text'.wrap('<li class="foo"><!-- sep --></li>', '<!-- sep -->'); // <li class="foo">your text</li>
(1234).wrap('<li></li>'); // <li>1234</li>
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 split3 = function(prefix, suffix){ | |
prefix = prefix || ''; | |
suffix = suffix || ''; | |
var m = this < 0; | |
var str = String(this * ( m ? -1 : 1)).split('.'); | |
var arr = String(str[0]).split(''), len = Math.ceil(arr.length / 3), res = []; | |
for (var i = 0; i < len; ++i) { | |
res.unshift(arr.splice(-3, 3).join('')); | |
} |
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
String.prototype.h = function() { | |
return jQuery('<div />').html(this).text(); | |
} |
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 id="foo" class="hide-text">This is a hidden text.</div> | |
<style type="text/css"> | |
.hide-text { | |
text-indent: 100%; | |
white-space: nowrap; | |
overflow: hidden; | |
} | |
#foo { | |
height: 200px; | |
width: 400px; |
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 PluginName = function ( element, options ) { | |
this.$element = $(element); | |
this.options = $.extend({}, $.fn.pluginName.defaults, options); | |
} | |
PluginName.prototype = { | |
constructor: PluginName | |
, methodName: function () { | |
return this; | |
} |
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
#!/bin/bash | |
# | |
# CentOS6.2 | |
# | |
# | |
# vars | |
# | |
UNAME=`uname -i` |
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
#!/bin/sh | |
# | |
# CentOS6.2 | |
# | |
# | |
# vars | |
# | |
UNAME=`uname -i` |
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
<a href="http://b.hatena.ne.jp/entry/http://tipshare.info/" class="hatena-bookmark-button" data-hatena-bookmark-title="tipshare" data-hatena-bookmark-layout="vertical" title="このエントリーをはてなブックマークに追加"> | |
<img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /> | |
</a> | |
<script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script> |
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
// ==UserScript== | |
// @name code_highlighter_for_gist.user.js | |
// @namespace http://www.direct-serarch.jp/ | |
// @description Changes style of Gist's syntax highlight | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
// forked from https://gist.github.com/1254056 | |
(function () { | |
var styles = { |
- gist: 1930107 default layout of CakePHP2.0
- gist: 1930200 default layout of CakePHP2.1
- gist: 1930255 To set title_for_layout
- gist: 1930304 To set scriptBlock