We're growing into something new. Read More
Ahrengot

Jens Ahrengot Boddum


Discussion

Speech Recognition

Hey guys, Stumpled on `x-webkit-speech` the other day and thought it was pretty cool so I whipped up a demo and tutorial. So basically you can turn on speech recognition for any old input in Google Chrome using the `x-webkit-speech` boolean. You can try out the demo and read the tutorial here: http://ahrengot.com/tutorials/speak-to-your-inputs/ The demo is also available on Github https://github.com/Ahrengot/speech-recognition Also, is this something you've ever used on a live site? I think it's pretty gimmicky, but could see use cases where it would be cool.

Discussion

What software do you use for project management.

Looking for simple project-management software A while back I started freelancing and I'm starting to get a lot of projects to juggle so it feels like I'm outgrowing my post-it's-on-the-wall solution. I'm still looking for a simple solution. Something like Things or WunderKit might be enough for me, but I'd like to know if you guys have any suggestions. My problem now is figuring out when I'm free to take on new projects – so something where I can put in "Project x takes two weeks, project y takes one week and project z takes three weeks". then ask the program "When am I available for new projects" and it shoots back "In 6 weeks". I'm using Billings for time tracking and invoicing so that part is taking care of.

Discussion

Getting started with Sublime Text

Hey guys, SublimeText looks like a really nice editor. Especially like the mini map thingy and JavaScript code completetion, but I'm having a little trouble finding out if it's really something for me or not. I really enjoyed Panic's tricks for developers when I first started using coda, and was wondering if something simmilar exists for Sublime Text.

Discussion

JS: Convert string to variable name

Hey guys. I've hit a wall trying to do something really simple. I think I've fried my brain, because I'm unable figure this out. Here's a simplified version of my problem what I've got $('.selector').each(function() { var $el = $(this), m = new ArtistModel(), v = new ArtistView({ model: new ArtistModel(), el: $el[0] }); var properties = ['id', 'title', 'scene']; for (var i = 0; i < properties.length; i++) { var prop = properties[i]; v.model.set({ prop: $el.data(prop) }); } }); Raw Code » My problem is here: v.model.set({ prop: prop needs to be the variable name id, title or scene, but my script, understandably, thinks that I want the variable name to be prop. Hence the loop keeps overwriting the same variable instead of creating new ones. I've tried defining window.prop and using window[prop] but it throws an error. As do properties[i].

Will you critique my portfolio? Pretty please!

ahrengot.com/work/ ahrengot.com/work/skive-festival-app/ ahrengot.com/work/skive-festival-website/ Looks like I finally managed to get to a point with my new portfolio where I felt comfortable enough to upload it and share it with the world: ahrengot.com/ I Would really like your critiques on the site. Mainly looking at feedback in these areas: Is the navigation working for you. Talking about both primary and sub-navigation (things like "Get in touch" in the post meta section) How is the load time? I've put all static content on Amazon's S3 and distribute it via CloudFront but the host itself is based somewhere in europe. What's your general impression of my portfolio?

Discussion

.m4v and .mp4 videos on my server won't play on iDevices

About to start pulling out hair here. For some reason videos that should be iOS compatible (correct bit rate, format and encoding profile) don't work when I upload them to my web server. At first I thought this was an issue with MIME types, but I've got the following in my .htaccess file so things should be just dandy, right? # ---------------------------------------------------------------------- # Proper MIME type for all files # ---------------------------------------------------------------------- # video AddType video/ogg ogv AddType video/mp4 mp4 mp4v mpg4 m4v AddType video/webm webm Raw Code » When I upload the files to my public Dropbox folder, or when I set up a local server with MAMP they work just fine on iOS. Any ideas about what might be going on here? Alright, I finally figured it out. It was because of the way I was Gzipping files on the server. I copy/pasted this from the most recent version of H5BP and now everything works just fine. # ---------------------------------------------------------------------- # Gzip compression # ---------------------------------------------------------------------- <IfModule mod_deflate.c> # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/ <IfModule mod_setenvif.c> <IfModule mod_headers.c> SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding </IfModule> </IfModule> # HTML, TXT, CSS, JavaScript, JSON, XML, HTC: <IfModule filter_module> FilterDeclare COMPRESS FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype FilterChain COMPRESS FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no </IfModule> <IfModule !mod_filter.c> # Legacy versions of Apache AddOutputFilterByType DEFLATE text/html text/plain text/css application/json AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE text/xml application/xml text/x-component AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype </IfModule> </IfModule> Raw Code »

Discussion

Generate unique number/name in JavaScript

I'm working on a jQuery plugin where I need to generate a unique number/ID each time the plugin is activated. This is what I'm doing right now: // Generate unique ID var unique = new Date().getTime(); Raw Code » This gets the number of miliseconds passed since 1970, but this doesn't seem like an ideal solution. What if the user has a super fast computer that actually executes the script generating the unique ID/Number multiple times in one milisecond?.. On my MacBook Pro the IDs are generated approximately 3ms apart. What I'm looking for is a smarter way to do this. Does anyone have a suggestion?

Discussion

URL Rewrites in JavaScript apps without /#/ or /#!/

Take a look at danielhritzkiv.com/ – Can someone tell me how in the world they make 'real' URL rewrites without hashbangs?