Jay Robinson: Quick note on why you should always use Progressive JPEGs if larger than 10KB
Lately I’ve been doing a ton of reading on decreasing website load time, image optimization techniques, responsive loading for different devices, and every detail I can find in between. One quick takeaway is that I will always tick the “progressive” checkbox in Photoshop’s Save for Web dialog…
Source: jayrobinson
Great, Another Bootstrap Site
If you have done your time and learned design or coding, then frameworks offer you a great way to take some shortcuts, but only because you know how to tweak your way through them when things get rough.
Introducing filer.js
Some 1300+ lines of code, 106 tests, and a year after I first started it, I’m happy to officially unleash filer.js (https://github.com/ebidel/filer.js); a wrapper library for the HTML5 Filesystem API.
Unlike other libraries [1, 2], filer.js takes a different approach and incorporates some lessons I learned while implementing the Google Docs Python client library. Namely, the library resuses familiar UNIX commands (
cp,mv,rm) for its API. My goal was to a.) make the HTML5 API more approachable for developers that have done file I/O in other languages, and b.) make repetitive operations (renaming, moving, duplicating) easier.So, say you wanted to list the files in a given folder. There’s an
ls()for that:var filer = new Filer(); filer.init({size: 1024 * 1024}, onInit.bind(filer), onError); function onInit(fs) { filer.ls('/', function(entries) { // entries is an Array of file/directories in the root folder. }, onError); } function onError(e) { ... }A majority of filer.js calls are asynchronous. That’s because the underlying HTML5 API is also asynchronous. However, the library is extremely versatile and tries to be your friend whenever possible. In most cases, callbacks are optional. filer.js is also good at accepting multiple types when working with entries. It accepts entries as string paths, filesystem: URLs, or as the
FileEntry/DirectoryEntryobject.For example,
ls()is happy to take your filesystem: URL or yourDirectoryEntry:// These will produce the same results. filer.ls(filer.fs.root.toURL(), function(entries) { ... }); filer.ls(filer.fs.root, function(entries) { ... }); filer.ls('/', function(entries) { ... });The library clocks in at 24kb (5.6kb compressed). I’ve thrown together a complete sample app to demonstrate most of filer.js’s functionality:
Try the DEMO
Lastly, there’s room for improvement:
- Incorporate Chrome’s Quota Management API
- Make usage in Web Workers more friendly (there is a synchronous API).
I look forward to your feedback and pull requests!
Source: ericbidelman
Pepatah Bijaksana Mario Teguh dkk
Motivasi buat “MAHASISWA” hari ini oleh Mario Teguh dan kawan-kawannya, semoga termotivasi :
“Hentikanlah kebiasaanmu membandingkan kekuranganmu dengan kelebihan orang lain.”
(Mario Teguh)
“Bila anda gagal hari ini, jangan pernah menyerah. Ulangi terus kegagalan anda sampai atasan/komandan anda menyerah.”
(Mario Tegar)
“Jangan pernah menyerah… Benturkanlah kepala anda ditembok atau batu, maka akan keluar darah/minimal benjol.”
(Mario Bross)
“Jika modal usaha Anda habis untuk aktivitas usaha Anda, setor terus modal Anda sekalipun tidak mendatangkan hasil bila kurang gadaikan saja apa yg bisa jd uang.”
(Mario Tekor)
“Tak ada pekerjaan yg berat. Pekerjaan seberat apapun akan terasa ringan apabila tidak dikerjakan”
(Mario Ngeluh)
“Jika anda merasa lelah dengan pekerjaan anda, maka tidurlah, maka 1 masalah sudah terselesaikan.”
(Mario Tepar)
Source: fuckyeahmahasiswa
Javascript, The world’s most misunderstood programming language.
Q:WHAT IS YOUR EARLIEST HUMAN MEMORY?
sorry, i’ve forgotten that :)
Hello Tumblr World!
Initializing…
