$('input.filter').live('keyup', function() { | |
var rex = new RegExp($(this).val(), 'i'); | |
$('.searchable tr').hide(); | |
$('.searchable tr').filter(function() { | |
return rex.test($(this).text()); | |
}).show(); | |
}); |
<link href="data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAD9/f0F/Pz8DP///wD///8P////Dv///xL///8P////A////wD///8A/v7+Cf///wX///8A////APv7+wr9/f0D+/v7Dv///wb///81+vv8i/v7/Iv3+PqL4+nxi+ru9JHy9Piu5+zzru3w9ZD+/v5x/v7+H////wr///8A9/f3H/7+/g7///8J////HNDX5Pyaq8j/m6zJ/5esy/+QpcX/larK/5uwzv+MoMH/mqrG/5qlv+7Q0Nty/f3+Af///wD///8A/v7+A////wz+/v6b2d/q/4abvf+Emr7/jKHD/5Gnyf+Uqsz/fpW5/4mXuP/U1OL/e3ui+MPE0l7///8A////AP///wD///8P////Xa680/9/lrr/kafJ/5yy0/+WrM7/nbPT/52uyv+ktM7/1NTi/8LC1f+lpr3n////AP///wD///8A////AP7+/mDo7PL/ytPi/5yv0fehsuXuuMvl0Kq81drS2uf8+/z9bff3+SG5uM1r8vL1ff///wD///8A////AP///wr+/v4H/v7+jufq8umIg/Sut7L9YKul/W7PzvlMnZn03Ozq/x/+/v4H////AP///wD///8A////AP///wD///8A5OH/IpuS/pF3cfPploz/hH5y/6F/dP+gl47/gkw++e7Hwv9Fta//XPj4/gf///8A////AP///wD///8A+vn/BoyB/pGlnf5vfHfxy4mA/JlIOf/lmZD+f1lK/89kWPrPmZD+f9zY/yu3sP5ar6j/ZP///wD///8A6uj/GbSt/l6imv9yVkf/1HBm+MJ5eOrlhX/1s2JY+dRpYPfPv7/zb4+F/41WR//Uloz/hI6E/47///8A////AOro/xmnn/9teW3/qH5y/6HKxf9B9/n7Fc3N9VfMyvlQraj |
// ORIGINAL: | |
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { | |
// some code.. | |
} | |
// My helper property: | |
window._IS_MOBILE_DEVICE = (function () { |
#!/usr/bin/env bash -e | |
# Cool stuff from http://dave.cheney.net/2013/06/19/stress-test-your-go-packages | |
go test -c | |
# comment above and uncomment below to enable the race builder | |
# go test -c -race | |
PKG=$(basename $(pwd)) | |
while true ; do |
SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema; |
openssl genrsa -des3 -out fooboo.key 2048 | |
openssl req -new -key fooboo.key -out fooboo.csr | |
openssl x509 -req -days 365 -in fooboo.csr -signkey fooboo.key -out fooboo.crt |
If you've written your share of JavaScript, you've likely encountered scenarios where independent asynchronous requests need to complete before execution can continue. In many cases, you're forced to impose an order to the requests and nest some callbacks to be notified of their completion. Another common, albeit dirty approach, is to pollute the parent scope of the events with flags of some sort and poll them on a particular time interval until completion.
In either case, maintainability becomes a nightmare and will likely cause future readers of your code to do an enormous amount of desk flipping.
Fortunately enough, we can dig into our bag of constructs and make use of what's commonly referred to as a promise, an abstract concept thats made its way into jQuery and has recently gained native support in modern browsers.
##Promises - A Brief Introduction ##
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime |
For instance, to copy a file called rental_agreement.doc from our remote machine to a new file called agreement.doc on our local machine, we’d execute: | |
scp tandorra@10.0.1.5:/Users/tandorra/Desktop/rental_agreement.doc agreement.doc | |
Obviously, the burden in this situation is knowing the exact location and name of the file before transferring it. Copying a file from your local machine to a remote one is a little easier. In that situation, we’d execute this command instead: | |
scp file-to-copy user@remote-address:path-to-new-saved-file |