- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
@turquoise: #95A5A6; | |
@emerald: #2ECC71; | |
@peter-river: #3498DB; | |
@amethyst: #9B59B6; | |
@wet-asphalt: #34495E; | |
@green-sea: #16A085; | |
@nephritis: #27AE60; | |
@belize-hole: #2980B9; | |
@wisteria: #8E44AD; | |
@midnight-blue: #2C3E50; |
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
/* | |
To use it: | |
require(['video'], function(Video){ | |
var video = new Video('.video'); | |
// optionally, you can either drag a video file over the .video element | |
video.playvideo('a valid video url'); | |
}); | |
*/ |
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
<form id="contact" name="contact" method="post"> | |
<fieldset> | |
<label for="name" id="name">Name<span class="required">*</span></label> | |
<input type="text" name="name" id="name" size="30" value="" required/> | |
<label for="email" id="email">Email<span class="required">*</span></label> | |
<input type="text" name="email" id="email" size="30" value="" required/> | |
<label for="phone" id="phone">Phone</label> | |
<input type="text" name="phone" id="phone" size="30" value="" /> |
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 checkForCloseMatch(longString, shortString) { | |
// too many false positives with very short strings | |
if (shortString.length < 3) return ''; | |
// test if the shortString is in the string (so everything is fine) | |
if (longString.includes(shortString)) return ''; | |
// split the shortString string into two at each postion e.g. g|mail gm|ail gma|il gmai|l | |
for (let i = 1; i < shortString.length; i++) { | |
const firstPart = shortString.substring(0, 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
Here are all the classes from Bootstrap 3 (version 3.1.1). | |
Method of extraction: | |
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html" | |
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file: | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script> | |
<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
Bootstrap 3 - Carousel/Slider Collection | |
Article: http://sevenx.de/blog | |
Demo: http://sevenx.de/demo/bootstrap-carousel | |
Working Examples (inline Styles, CDN Scripts) | |
- minimal Bootstrap Markup changes | |
- minimal CSS Styles | |
- minimal jQuery |
$ uname -r
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
<?php | |
/** | |
* This file will activate the Airplane Mode plugin if not already activated. This is helpful when you do not have internet connection and you're unable to reach the WP Admin Plugins page to activate the plugin. | |
*/ | |
// get WP bootstrap | |
define('WP_USE_THEMES', false); | |
require(__DIR__ . '/wp/wp-blog-header.php'); | |
OlderNewer