At the Futurice Code Camp, we wanted to motivate people to share what they learn. We urged the campers to share code examples, which earned them a reward. It worked very well with snippets ranging from git configuration to RxJS best practices and some Clojure magic.
GitHub’s Gist is a great tool for sharing blocks of text or code with other people because each gist is also a git repository that you can fork. Gist also supports commenting the code and enables effortless collaborations around tiny bits of code.
And, since sharing is caring, here are the gists from our code camp:
- Prepending stuff to an Rx stream https://gist.github.com/asharov/5511991
- RxJS intro snippets https://gist.github.com/ekantola/5507237
- No need to remember to rebase https://gist.github.com/anonymous/5507549
- Helper method for combining latest values from different RxJS observable streams into a new stream based on a JS object template. https://gist.github.com/cido/5507695
- Example RxJS file dnd upload https://gist.github.com/seance/5507768
- valueAsObservable.js https://gist.github.com/heikela/5508499 https://gist.github.com/pyrtsa/5512257
- Daily allowance calculation by country, city and start and end dates https://gist.github.com/rap1ds/5509080
- Download a file with "AJAX" kind of POST request. https://gist.github.com/cido/5509299
- select.js https://gist.github.com/kpuputti/5512956
- valueAndValidFrom, a helper method for creating a pair of value and validity streams from a single RxJS Observable stream. Rocks the world, at least ours. https://gist.github.com/cido/5513726