Underscore example:
_.each([1, 2, 3], function(num) { alert(num); });| // Inspired by https://github.com/logicalparadox/backbone.iobind/blob/master/lib/sync.js | |
| // Overwrite Backbone.sync method | |
| Backbone.sync = function(method, model, options){ | |
| // create a connection to the server | |
| var ws = new WebSocket('ws://127.0.0.1:1234'); | |
| // send the command in url only if the connection is opened | |
| // command attribute is used in server-side. | |
| ws.onopen = function(){ |
| /* | |
| Crayola crayon colors | |
| Compiled by @LATdatadesk | |
| Source: http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors | |
| */ | |
| // Standard colors | |
| @almond: #EFDECD; | |
| @antique_brass: #CD9575; |
| var array = []; | |
| function closest(array,num){ | |
| var i=0; | |
| var minDiff=1000; | |
| var ans; | |
| for(i in array){ | |
| var m=Math.abs(num-array[i]); | |
| if(m<minDiff){ | |
| minDiff=m; |
This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.
If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.
People
:bowtie: |
๐ :smile: |
๐ :laughing: |
|---|---|---|
๐ :blush: |
๐ :smiley: |
:relaxed: |
๐ :smirk: |
๐ :heart_eyes: |
๐ :kissing_heart: |
๐ :kissing_closed_eyes: |
๐ณ :flushed: |
๐ :relieved: |
๐ :satisfied: |
๐ :grin: |
๐ :wink: |
๐ :stuck_out_tongue_winking_eye: |
๐ :stuck_out_tongue_closed_eyes: |
๐ :grinning: |
๐ :kissing: |
๐ :kissing_smiling_eyes: |
๐ :stuck_out_tongue: |
| /** | |
| * Helvetica Neue Normal (No Stretch) | |
| */ | |
| /* Helvetica Neue Black Font Stack */ | |
| .{font-family: "HelveticaNeueBlack", "HelveticaNeue-Black", "Helvetica Neue Black", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:800; font-stretch:normal;} | |
| /* Helvetica Neue Heavy Font Stack */ | |
| .{font-family: "HelveticaNeueHeavy", "HelveticaNeue-Heavy", "Helvetica Neue Heavy", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:700; font-stretch:normal;} |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math