Skip to content

Instantly share code, notes, and snippets.

View pkozlowski-opensource's full-sized avatar

Pawel Kozlowski pkozlowski-opensource

View GitHub Profile
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@0x-r4bbit
0x-r4bbit / proposal.md
Last active May 2, 2022 03:50
Proposals on how to structure 'standalone' modules in angular. Please read it and leave your opinions for a better angularjs world!

Angular module structure (proposal)

Everyone who's reading this, please leave your opinion/ideas/proposals as a comment for a better world!

Background

Most of you guys read Josh' proposals to make components more reusable, I think. Now, reading through this proposals definitely gives a feeling that this is the right way. Anyways, If you haven't read it yet, you should.

So Josh shows us, how angular apps can be structured in a better and more reusable way. Reusability is a very important thing when it comes to software development. Actually the whole angularjs library follows a philosophy of reusability. Which is why you able to make things like:

@ajoslin
ajoslin / problems.md
Last active December 16, 2015 18:29
ui-bootstrap $dialog service refactor discussion

(written by @pawel)

We've got a number of bug reports opened for the $dialog service and while some of them can be fixed by (relatively) simple changes to the existing code-base some other are difficult to solve due to the way current code is structured. Additionally the existing API would benefit from some some simplifications.

This docs aims to list existing issues and propose a new API plus some implementations details that would address existing issues.

As a remainder, docs for the current service are located here: https://github.com/angular-ui/bootstrap/blob/master/src/dialog/README.md

Known issues

API

@pkozlowski-opensource
pkozlowski-opensource / gist:5a57d28ccfeacaba7661
Last active August 29, 2015 14:11
$http and request param serialisation issues

Issues description

"Hard-coded" serialization format for request parameters

The current version of the $http service has a hard-coded way of serializing request parameters. This one-and-only-one way of doing things causes practical problems to people using backends that have different serialziation schemas (mostly Rails and PHP).

More specifically, given this $http call:

$http.get('http://google.com', {params: {foo: [1 ,2], bar: 'sth;else'}});