Skip to content

Instantly share code, notes, and snippets.

View rodp's full-sized avatar

Rodoljub Petrović rodp

View GitHub Profile
@rodp
rodp / easy-peasy.md
Last active November 19, 2018 08:04
The Coding Assignment

The Coding Assignment

You only need to write one function and some unit tests that prove (first and foremost to you) that the function does what you intended. You don't need to do more than that. For example, you don't need to also write all the dependencies, readme, include runtime config and dependency management, pay people on Fivr to generate some fake data, develop an entire web app, put it in a Docker container and deploy it to AWS, incorporate, raise money and make billions from our coding assignment. One function and some tests is all we need.

We use JavaScript, but feel free to use any language you're comfortable with. Please don't use JavaScript just because we use JavaScript. It's actually quite fun to see solutions in different languages. But please don't use a different language just because we said this.

We will pretend we are giving you a few existing dependency functions. We described their interface below. You should use them to write your function. Even though we're not actually giving

@rodp
rodp / coding.md
Last active October 25, 2018 14:09
Coding Assignment

First and foremost: this assignment shouldn’t be too hard. Seriously. It contains no tricks and you don't need to be a genius to do it.

Basically, you just need to write a function and a test for it. We don't need you to write a REST API that you'll put into a Docker image and deploy to AWS. Please, don't do that. Just make some assumptions that seem sensible to you -- don't worry if you're not 100% sure -- and write some code we can later talk about.

The assignment aims to give us a glimpse of the decisions you make when you write real-world code. Ideally, the code should be readable, robust, optimal and tested: as if it will end up in production.

We recommend you use whatever language you feel strongest in. It doesn’t have to be one we use — we believe good developers can be productive in any language.

We won't give you any code or sample data on purpose. Ideally, you will read the description of the task and be able to make some sensible assumptions on your own. You can verify them by writing tests.

@rodp
rodp / keybase.md
Created March 22, 2017 09:08
Verifying myself on Keybase

Keybase proof

I hereby claim:

  • I am rodp on github.
  • I am rodpetrovic (https://keybase.io/rodpetrovic) on keybase.
  • I have a public key ASByOeUYqXnRgFBob76kM6to7I69LTJ9JJ7HOcrdUzZGTgo

To claim this, I am signing this object:

@rodp
rodp / FIRST.BAS
Created January 11, 2017 09:55
My first computer program
10 PRINT "ZDRAVO"
20 GOTO 10
<!doctype html>
<html>
<head>
<title>Challenge</title>
<style>
* { margin: 0; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
header, article, footer { position: absolute; left: 0; width: 100%; border: solid 1px red; }
header { top: 0; height: 20px; }
footer { bottom: 0; height: 20px; }
@rodp
rodp / google_io_pendulum_fix.js
Created March 19, 2012 11:12
Google I/O game pendulum fix
/*
I wanted to use the Pendulum tool in Google's I/O game
(https://developers.google.com/events/io/input-output)
but it was broken.
To fix it, run this in Chrome's JS console once the game is loaded.
*/
myRoot.PendulumEditorView = function(c){function b(){b.__super__.constructor.apply(this,arguments)}__extends(b,c);b.className="PendulumEditorView";b.prototype.adjustScale=function(a){var c,f,d,g,h,i,j,l=this;b.__super__.adjustScale.apply(this,arguments);d=this.componentObject.getRadius();c=a-d;this.componentObject.setRadius(a);this.componentObject.setPosition(this.componentObject.getPosition().subtract(newPoint(c,c)),true);g=this.outerControls.concat(this.colorControls).concat([this.scaleControl]);f=1;j=[];h=0;for(i=g.length;h<
i;h++){c=g[h];j.push(function(b){if(b===l.colorControl||__indexOf.call(l.colorControls,b)>=0)b.angle=l.getColorControlAngle(f++);return b.distance=b.distance-d+a}(c))}return j};b.prototype.adjustRotation=function(a){var c;c=this.componentObject.getRotation();b.__su
@rodp
rodp / personal_space.css
Created March 15, 2012 14:36
Reason behind CSS classes
/* Sometimes, other elements just need to stay the fuck away */
.space.above { padding-top: 5px; }
.personal.space.above { padding-top: 10px; }
.more.personal.space.above { padding-top: 15px; }
.space.below { padding-bottom: 5px; }
.personal.space.below { padding-bottom: 10px; }
.more.personal.space.below { padding-bottom: 15px; }
@rodp
rodp / section_heading.css
Created September 26, 2011 12:16
CSS puzzle solution
/**
This is a solution for the CSS puzzle at:
http://twitter.com/#!/rodpetrovic/status/118277887894888449
Markup: <h1><span>Recent ad activity</span></h1>
line.png: 500px line with fadeout on both ends
**/
h1 {