Note: This is still in the workings. If you have anything you want to see added into this document please leave some feedback in the comment section below; or mail me at kuroir at gmail dot com
<?php | |
/** | |
* YouTube Preg Match Test Case. | |
* | |
* @author Mario "Kuroir" Ricalde | |
*/ | |
// Regular Expression (the magic). | |
$youtube_regexp = "/^http:\/\/(?:www\.)?(?:youtube.com|youtu.be)\/(?:watch\?(?=.*v=([\w\-]+))(?:\S+)?|([\w\-]+))$/"; |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o
Oops! I accidentally deleted a local git branch, and I haven't pushed it to a remote server yet. The branch has several important commits, and it hasn't been merged with any other branches yet. How do I find the missing branch?
$ git fsck --full --no-reflogs --unreachable --lost-found
unreachable tree 4a407b1b09e0d8a16be70aa1547332432a698e18
unreachable tree 5040d8cf08c78119e66b9a3f8c4b61a240229259
unreachable tree 60c0ce61b040f5e604850f747f525e88043dae12
unreachable tree f080522d06b9853a2f18eeeb898724da4af7aed9
var time = 500; | |
$('.skyfonts-wrapper').each(function() { | |
var el = this; | |
time += 500; | |
setTimeout( function() { | |
$(el).find('button').click().parent().parent().find('.skyfonts-dropdown .input-submit').click(); | |
console.log('installing...'); | |
}, time ); | |
}) |
# SSH Change Directory | |
function sshcd() { | |
port="" | |
getopts ":p:" opt; | |
if [ ! -z $OPTARG ]; then | |
port="-p $OPTARG" | |
shift 2 | |
fi |
Picking a Color on Mac is hard. Mainly due to the fact that several applications floating around the web ( AppStore and independant ), grab the color "incorrectly".
Why incorrectly?
The color picker is not picking the "real" color, but rather, it's picking the color that your screen is displaying, what do I mean?
Lets try to grab the following color:
function imgdim() { | |
echo "Image Dimensions copied to the Clipboard." | |
sips -g pixelHeight -g pixelWidth $1 | sed '1 d' | sed 's/ pixelHeight: \(.*\)/height: \1px;/' | sed 's/ pixelWidth: \(.*\)/width: \1px;/' | pbcopy | |
} |
- 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