This file contains hidden or 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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> | |
<script src="https://raw.github.com/lvo811/jplaceholder/master/jplaceholder.js"></script> | |
<h2>Example 1</h2> | |
<p> | |
Placeholder text is hidden when input field is focusing | |
</p> | |
<form id="form1"> | |
<label> | |
<input name="user" jplaceholder="User ID" /> |
This file contains hidden or 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
<h1>Alert</h1> | |
<p>Bootstrap JS</p> | |
<div class="alert fade in"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. | |
</div> | |
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p> | |
<div class="alert fade" ng-class="{in:alert}"> | |
<button type="button" class="close" ng-click="alert=false">×</button> |
This file contains hidden or 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
# install ruby and rails | |
\curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails |
This file contains hidden or 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
/* | |
* AVIM JavaScript Vietnamese Input Method Source File dated 28-07-2008 | |
* | |
* Copyright (C) 2004-2008 Hieu Tran Dang <lt2hieu2004 (at) users (dot) sf (dot) net | |
* Website: http://noname00.com/hieu | |
* | |
* You are allowed to use this software in any way you want providing: | |
* 1. You must retain this copyright notice at all time | |
* 2. You must not claim that you or any other third party is the author | |
* of this software in any way. |
This file contains hidden or 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
#AVIMControl { | |
background-image: url('transparent.png'); | |
padding: 2px; | |
border: 1px solid #5b958e; | |
position: absolute; | |
top: 5px; | |
left: 5px; | |
width: 320px; | |
} |
This file contains hidden or 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
/* | |
author: Lance Vo | |
License: MIT | |
autoHeight directive | |
-------------------- | |
it calculates the remaining height (px) after substracting header/footer/offset. | |
Useful for responsive design content. | |
examples: |
This file contains hidden or 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 obj = { | |
x : 5, | |
y : 10 | |
}; | |
// defineProperty doesn't work on IE < 9, IE8 only when it's a DOM element | |
Object.defineProperty(obj, 'sum', { | |
get: function(){ | |
return this.x + this.y | |
} |
This file contains hidden or 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
sudo iptables -t nat -A PREROUTING -p tcp -port 80 -j REDIRECT --to-ports 3000 |
This file contains hidden or 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
// Source: http://eightmedia.github.io/hammer.js/examples/carousel.html | |
/** | |
* requestAnimationFrame and cancel polyfill | |
*/ | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = |
This file contains hidden or 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
<h3>expand content with css3</h3> | |
<div class="content"> | |
<ol> | |
<li>Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.</li> | |
<li>Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</li> | |
<li>Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.</li> | |
<li>Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.</li> | |
<li>Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.</li> | |
<li>Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliqua |
OlderNewer