Author: Will

  • Google Dependance

    I’m spending a few weeks in China, and one of the frustrating developments since the last time I was here is that access to Google services is largely unavailable from many public connections. Notably, both the standard WiFi and the public internet cafes claim to be unable to resolve secure connections to Google.

    I’m realizing at this point that this will make communication quite hard, since it greatly complicates stuff like getting email, posting photos, or chatting with friends back home.

  • nginx conditional redirection to php

    I recently spent a few hours struggling with nginx to recreate a previous apache rewrite rule. The goal was that
    for requests with a specific prefix, where the file is not found, redirect the request to a php script to attempt automatic thumbnail generation.

    My eventual location block looked like

    location ^~ /assets/ {
    try_files $uri /assets/thumbmaker.php?src=$uri;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root/assets/thumbmaker.php
    fastcgi_param PATH_INFO $uri;
    if (!-e $request_filename){
    fastcgi_pass php;
    }
    expires max;
    log_not_found off;
    }

  • Korean

    I’m signed up for the Beginning Korean class at UW this summer. It’s been a decade since I learned a new language from scratch, so we’ll see if I can keep up. The good news is that Korean uses an alphabet, rather than 汉字. The bad news is that korean grammar is difficult, and I’ll have to handle a level of conjugation that I haven’t seen before.

    안녕하세요!

  • TinyToCS

  • JS1K


    m="left|width|height|top|background|color|position".split('|');q=Math.random;A=
    120;d=(r=document)[N='createElement']('textarea');k=r[N]('a');k[D='style'][m[6]
    ]=U='absolute';n={6:U,0:0,3:0,1:z='300px',2:z,4:T='transparent',5:T};for(x in n
    )c[D][m[x]]=d[D][m[x]]=n[x];k[D][m[0]]=(c[m[1]]=c[m[2]]=v=parseInt(z))+14+'px';
    b[C='appendChild'](d);b[C](k);e=c.getContext('2d');s=[];L='length';d.onkeyup=f=
    function(k){c[m[1]]=v;e.font=d[D].font='14px arial';n=d.value.split('\n');l=0;
    for(x in n)e.fillText(n[x],3,l+=F=14);l=e.getImageData(0,0,v,v),o=l.data;for(i=
    0;O=s[i],i<s[L];i++){o[O[0]]==0&&(s[i]=[0]);for(j=0;j<O[L];j+=2){r=q();o[O[j]-2
    ]=O[j+1]+F*r+A;o[O[j]]=2*A;if(O[L]>F)continue;r<.05&&s[i].push(O[j]+A*10,A*r)||
    r<.1&&s[i].push(O[j]+4,A*r)}}for(i=0;!k&&i<o[L];i+=4)if(o[i+3]!=0&&q()<1/s[L])s
    .push([i+3,A]);s=s.filter(function(n){return n[L]>1});e.putImageData(l,0,0)};g=
    "lufituaeB = erutaN = modnaR".split('');setInterval("n=g.length&&(d.value+=g.
    pop());f(f(n))",v);k.innerText="Add your own Text and let the Moss take over"

    See it Here

  • Calendar

    It’s going to be a busy spring this year.

    Mar 24. Skiing at Whistler, SOSP deadline
    Mar 31. NSDI, Chicago.
    Apr 7. New Quarter TAing Distributed Systems
    May 12. Of Montreal, Google IO

  • White Label Google Forms

    Google Forms are a reasonable option for conducting quick surveys without having to manage your own server. Sometimes, though, you want a bit more control over the user experience than what is provided by the template.

    Google App Script lets you do this, the following script dumps provided variables into a spreadsheet, just like a Form would do:

    function doGet(request) {
      var result = {
        success: true
      };
    
      if (request && request.parameter && request.parameter.[name]) {
        var dataSS = SpreadsheetApp.openById("[spreadsheet id]");
        var sheet = dataSS.getActiveSheet();
        sheet.appendRow([
          Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd'T'HH:mm:ss'Z'"),
          request.parameter.[name]
        ]);
      } else {
        result.success = false;
      }
      
      return ContentService.createTextOutput(
          'callback(' + JSON.stringify(result) + ')')
          .setMimeType(ContentService.MimeType.JSON);
    }
    
  • Thinking about Internet Privacy

    Made a quick survey for my HCI class this quarter to look at how people think about their privacy online.

    net

  • Provider Change

    I switched this blog’s hosting provider from dreamhost to digital ocean over the last couple days. Some features may still be glitchy for a bit longer as I finish the migration.

    digitalocean

    The benefit is that I now am on a private VM, which allows features like SSL, so https://wills.co.tt/ is now active.