DevLog.at

Latest Posts

Welcome to DevLog

The open thought platform for developers.

Share your work as you work on it. Easier than a blog, handier than Twitter.

Sign in and write down valuable thoughts that would otherwise be forgotten.

iOS only allows https requests. However, I need to test on a server running locally on http.

NSExceptionAllowsInsecureHTTPLoads is the key you need to set to bypass this restriction. Here's the code you need to add to your Xcode project's Info.plist (beware, some of these keys may already exist in your project):

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>localhost</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>

Here it says localhost, but in my case I had add an extra entry for 10.0.0.239 – my laptop's local ip address – since I was testing my app on-device.

6d

My company is a SaaS but there's a lot of manual DB querying that we need to do on each customer environment. I want to automate that.

Stack

  • Tornado and various SQL sauce
  • Mithril and Construct-UI
  • Vanilla JS otherwise

13d

Finished the unity tutorial finally! https://www.youtube.com/watch?v=IypPRsuA2yg

24d

still dont know how to do ssr with auth

2m

Just wanted to share that I am currently writing up a blog post for this process as when I was searching for materials as to how to implement it, every tutorial I came across showed how to generate the QR code, and add it to Google authenticator, however none actually showed how to verify the code from the authenticator.

I will link it here if afterwards and hopefully it helps someone who is in the same situation that I found myself in :)

2m

Been thinking about dask vs Husky vs Spark

2m

Making sure proper error codes and messages are returned by the API.

2m

A mate of mine is a writer by trade but around 2-3 years ago started mucking about with front-end web tech - HTML, CSS, Javascript. He's just about finished making his portfolio website and asked for a hand testing / reviewing from a technical angle and sorting out some finer points. It is such a joy seeing a consumately designed indie website. I'm looking at 4000 lines of hand-written CSS and it really takes me down memory lane.

2m

A cli that randomly clicks around and messes with a website and reports what it is doing as a highly detailed tsv file.

Then you can see if any exceptions occur, read the reported tsv logs and decide if it warrants further investigation.

2m

Some other functions you can call on your Map include:

map.set('cat','tofu');

map.has('cat'); //true

map.get('cat'); //tofu

map.delete('dog');

map.has('dog'); //false

2m

But let's say we do want to match all the case variations of funFunfun including FunFunFun, funfunfun etc...

Add the letter i to the end like so: /funFunfun/i

The letter i is one type of 'flag' that modifies regex search

2m

Implemented an intricate anti-spam measure.

window.setTimeout(function(){
    var sf = 'sf_' + Math.random().toString(36).replace('0.', ''); 	    var sf = $('#sf');
    $('.donation-form').append($("<input type='hidden' name='sf'/>").val(sf));	
     if(sf.val())
      sf.val(sf.val() + '!');
    else
      sf.val(Math.random().toString(36).replace('0.', '') + $('#donation_form_id').val());
  }, 7000);	  }, 7000);
});	});

3m