Better HN
topnewbestaskshowjobs
Log inSign up

granttimmerman

123 karma · joined Mar 17, 2013 (13y ago) · 81 submissions

[ my public key: https://keybase.io/grant; my proof: https://keybase.io/grant/sigs/gMj6YbASNewA5Mr8G6UtguFyGWuGH0QXSN458u3TozU ]

Web Fanatic.

http://grant.cm

Submissions

comment 5y ago · link · parent

(Disclaimer: I work on Google Cloud Functions)

With Google Cloud Functions, you can run your function locally using the Function Framework libraries (available in all Cloud Function languages) [0]. These libraries are used in production Cloud Functions, so you're not emulating the runtime. The feedback loop / devX is pretty simple with just 1 command to run the function locally like a library for every language.

We have some guides on local development here [1]. Our samples have system tests that use the FF.

You also can bundle your function in a container after building it with `pack build` [2]. This provides an exact container environment with things like environment variables and system packages.

We're working on improving eventing devX, but we have some `curl` examples here [3]. Connecting multiple functions together eloquently is still something to be desired though.

[0] https://github.com/GoogleCloudPlatform/functions-framework [1] https://cloud.google.com/functions/docs/running/overview [2] https://cloud.google.com/functions/docs/building/pack [3] https://cloud.google.com/functions/docs/running/calling

comment 8y ago · link · parent

She did say live plants are very important.

comment 8y ago · link · parent

The comment was about trending G Suite into open source.

You've got to start somewhere. It starts with developer samples, moves into tools, languages (Apps Script), then sub-products.

If you're asking for Google to open source it's products in one big blow, I don't think that will happen without smaller steps. I'm on the team that would probably best start the conversation of considering G Suite in open source. Would love to hear proposals.

comment 8y ago · link · parent

(Disclaimer: I work on G Suite Open Source) I open sourced our developer samples this week: github.com/gsuitedevs

There's an increasing amount of things you can do with G Suite, almost all our products have APIs and Apps Script libraries.

If there's something missing in our APIs, feel free to let us know.

comment 10y ago · link · parent

I built a very similar project for classical music using Theano and MusicXML for a Sound Capstone Project at UW.

Blogpost + music: https://medium.com/@granttimmerman/algo-rhythm-music-composi...

GitHub: https://github.com/grant/algo-rhythm

6.

React.js: The Front End Framework of the Future(youtube.com ↗)

3 points · by granttimmerman · 11y ago · discuss

7.

DubHacks Spring(15s.dubhacks.co ↗)

2 points · by granttimmerman · 11y ago · discuss

comment 11y ago · link · parent

That's a lot of `padding-top`. Almost looks like the vertical height is misaligned.

9.

Welcome to the New OpenTable(blog.opentable.com ↗)

1 points · by granttimmerman · 11y ago · discuss

10.

Open Table's New Brand(brand.opentable.com ↗)

1 points · by granttimmerman · 11y ago · discuss

11.

Product Grunt: The worst old products, every day(productgrunt.com ↗)

7 points · by granttimmerman · 12y ago · 1 comment

12.

Vinli: Making cars smarter, safer and more fun(vin.li ↗)

2 points · by granttimmerman · 12y ago · discuss

comment 12y ago · link · parent

In Seattle, Stash (https://angel.co/stash-4) is doing this.

comment 12y ago · link · parent

I particularly like input = "qwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvwqwdtytdwqertytreqxctntcxzxctbtvw"

comment 12y ago · link · parent

I created a music auto-player since I was too lazy to play your guy's songs by myself. Paste this in the console.

  // SETTINGS
  var input = "rsa ecde srgu yhgr bv rsa ecde srgu yhgr bv hybtg ser erv";
  input += " hybtg iii r hybtg ser erv tvr rrr rvgres rrr rvg rrr rvgres ";
  input += "ggg rgh grs sxebbe cuuuhbgres grs sxebbe cbbbgvrsai";
  var TIME_INTERVAL = 300;

  // Add jquery
  var script = document.createElement('script');
  script.src = 'http://code.jquery.com/jquery-1.11.0.min.js';
  script.type = 'text/javascript';
  document.getElementsByTagName('head')[0].appendChild(script);

  function play () {
    // Sound array setup
    var soundArray = [];
    var down = $.Event("keydown");
    var up = $.Event("keyup");
    input = '  ' + input; // hack
    for (var i = 0; i < input.length; ++i) {
      soundArray.push(input.toUpperCase().charCodeAt(i));
    }

    // Start sound
    var index = 0;
    function playSound () {
      up.which = soundArray[index];
      $("body").trigger(up);
      ++index;

      down.which = soundArray[index];
      $("body").trigger(down);
      // // is there another?
      if (index < soundArray.length) {
        setTimeout(playSound, TIME_INTERVAL);
      }
    }
    playSound();
  }

  (function loadjQuery () {
    if (typeof jQuery === 'undefined') {
      setTimeout(loadjQuery, 100);
    } else {
      play();
    }
  })();

comment 12y ago · link · parent

For anybody who wants a little bit more structure than LCON but less clutter than JSON, I'd recommend checking out CSON.

https://github.com/bevry/cson

comment 12y ago · link · parent

I love being able to drive in reverse at 300km/h.

comment 12y ago · link · parent

Fun stuff.

  function action(){
    var opacity1 = $('#color-1')[0].getContext('2d').getImageData(0,0,1,1).data[3];
    var opacity2 = $('#color-2')[0].getContext('2d').getImageData(0,0,1,1).data[3];
    if(opacity1 > opacity2){
      $('#color-1').trigger('click');
    }else{
      $('#color-2').trigger('click');
    } 
  };

  setInterval('action()', 100);

comment 12y ago · link · parent

Here's how to hack the hacking game. Pretty simple (in your console):

app.sendAnswer({answer: 1,time: -999999999999})

(I added the instructions on the leaderboard itself)

comment 12y ago · link · parent

Markov chain circle generator: https://gist.github.com/grant/29afaa91349b1928b05e

comment 12y ago · link · parent

I created a Markov chain generator: https://gist.github.com/grant/561834963dc526495c45

var numNodes=10;var roundNum=100;var a=[];for(var i=0;i<numNodes;++i){var connections=[];var sum=0;for(var j=0;j<numNodes;++j){var randNum=Math.random()/numNodes;randNum=Math.round(randNumroundNum)/roundNum;connections[j]=randNum;sum+=randNum}connections=connections.map(function(e){var t=e(1/sum);t=Math.round(troundNum)/roundNum;return t});sum=connections.reduce(function(e,t){return e+t});connections[numNodes-1]+=1-sum;connections[numNodes-1]=Math.round(connections[numNodes-1]roundNum)/roundNum;a[i]=connections}console.log(JSON.stringify(a))

Copy and paste the output into the side bar.

22.

WWDC Logo out of HTML, CSS, and JS(github.com ↗)

2 points · by granttimmerman · 12y ago · discuss

23.

Swift Cheat Sheet(github.com ↗)

3 points · by granttimmerman · 12y ago · discuss

comment 12y ago · link · parent

Awesome!!! Can't wait for the future of IO.

comment 12y ago · link · parent

Scrolling becomes is really buggy if you Cmd + f to search for something.

But overall, nice UI.

comment 12y ago · link · parent

You might want to look at https://github.com/visionmedia/term-canvas

27.

Xkcd API(github.com ↗)

1 points · by granttimmerman · 12y ago · discuss

comment 12y ago · link · parent

You can also press `t` on any repo on github to find files/filetypes quickly.

comment 12y ago · link · parent

I'm working on an idea that does this but is more generic than just cooking. Look out for the public beta in September.

comment 12y ago · link · parent

http://imgur.com/JJVvmy9

I just finished my portfolio website http://grant.cm

Github: https://github.com/grant/grant.cm

123