Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| /*jslint devel: true, indent: 2 */ | |
| // 15.2.3.2 | |
| if (!Object.setPrototypeOf) { | |
| Object.setPrototypeOf = (function(Object, magic) { | |
| 'use strict'; | |
| var set; | |
| function checkArgs(O, proto) { | |
| if (typeof O !== 'object' || O === null) { | |
| throw new TypeError('can not set prototype on a non-object'); | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
| //var csv is the CSV file with headers | |
| function csvJSON(csv){ | |
| var lines=csv.split("\n"); | |
| var result = []; | |
| var headers=lines[0].split(","); | |
| for(var i=1;i<lines.length;i++){ |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| # There are 3 levels of git config; project, global and system. | |
| # project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
| # global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
| # system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
| # Create a project specific config, you have to execute this under the project's directory. | |
| $ git config user.name "John Doe" | |
| # Create a global config |
| replace-in-selector($what, $with = '') | |
| /{replace($what, $with , selector())} | |
| {block} | |
| root-selector() | |
| +replace-in-selector('^(\S+).*', '$1') | |
| {block} | |
| .foo | |
| .bar |
| #ifdef GL_ES | |
| precision highp float; | |
| #endif | |
| uniform sampler2D from, to; | |
| uniform float progress; | |
| uniform vec2 resolution; | |
| void main() { | |
| vec2 p = gl_FragCoord.xy / resolution.xy; | |
| gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress); |