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
window.addEventListener('orientationchange', handleOrientation, false); | |
function handleOrientation() { | |
if (orientation == 0) { | |
//portraitMode | |
} else if (orientation == 90) { | |
//landscapeMode | |
} else if (orientation == -90) { | |
//landscapeMode | |
} else if (orientation == 180) { |
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
Array.prototype.inArray = function (value) { | |
var i; | |
for (i=0; i < this.length; i++) { | |
if (this[i] === value) { | |
return true; | |
} | |
} | |
return false; | |
}; |
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($) { | |
$.fn.extend( { | |
limiter: function(limit, elem) { | |
$(this).on("keyup focus", function() { | |
setCount(this, elem); | |
}); | |
function setCount(src, elem) { | |
var chars = src.value.length; | |
if (chars > limit) { | |
src.value = src.value.substr(0, limit); |
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
<ul class="pagination"> | |
<li class="arrow unavailable"><a href="">«</a></li> | |
<li class="current"><a href="">1</a></li> | |
<li><a href="">2</a></li> | |
<li><a href="">3</a></li> | |
<li><a href="">4</a></li> | |
<li class="unavailable"><a href="">…</a></li> | |
<li><a href="">12</a></li> | |
<li><a href="">13</a></li> | |
<li class="arrow"><a href="">»</a></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
<nav class="top-bar" data-topbar> | |
<ul class="title-area"> | |
<li class="name"><h1><a href="#">Something</a></h1></li> | |
<li class="toggle-topbar menu-icon"><a href="#">Menu</a></li> | |
</ul> | |
<section class="top-bar-section"> | |
<!-- Right Nav Section --> | |
<ul class="right"> | |
<li class="active"><a href="#">Right Nav Button Active</a></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
Show hidden characters
[ | |
{ | |
"keys": ["super+shift+e"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"}, | |
"keys": ["super+shift+p"], "command": "prompt_select_workspace", | |
"keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} | |
} | |
] |
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
jQuery.fn.quickEach = (function(){ | |
var jq = jQuery([1]); | |
return function(c) { | |
var i = -1, el, len = this.length; | |
try { | |
while ( | |
++i < len && | |
(el = jq[0] = this[i]) && | |
c.call(jq, i, el) !== false | |
); |
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
$( document ).on( "pagebeforeshow", function() { | |
$('a[href*="#anchor"]').attr('data-ajax','false'); | |
}); |
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 | |
if [ ! -d "typo3_src-$*" ]; then | |
echo "download typo3 source" | |
wget http://get.typo3.org/$* | |
echo "unzip typo3 source" | |
tar xfz typo3_src-$*.tar.gz | |
rm -rf typo3_src-$*.tar.gz | |
fi | |
echo "unlink previous typo3 source" | |
unlink typo3_src |
OlderNewer