View README.md

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style media="screen">
html,body{
font-family: monospace;
View post-receive
#!/bin/sh
#
# This hook is placed in Bare repository and it updates Working tree whenever a PUSH
# is executed
#
# Assuming following file structure:
# .
# |-- myproject
# |-- myproject.git
# set WORKTREE=../myproject
View dabblet.css
/**
* Slanted tabs with CSS 3D transforms
* See http://lea.verou.me/2013/10/slanted-tabs-with-css-3d-transforms/
*/
body { padding: 50px; }
nav {
position: relative;
z-index: 1;
View FastFtol.cpp
inline int FastFtol(const float a)
{
static int b;
#if defined(_MSVC)
__asm fld a
__asm fistp b
#elif defined(__GNUG__)
// use AT&T inline assembly style, document that
View generateFiles.sh
for i in `seq 1 1000`; do
mkdir -p files-$i;
for j in `seq 1 100`; do
dd if=/dev/zero of=files-$i/$j bs=100k count=1 2> /dev/null;
done;
done
View TuentiPhotoRemove.js
var urlFotoAnterior = "";
var interval = setInterval(function (){
try {
var urlFotoActual = document.getElementById("photo_image").getAttribute("src");
if (urlFotoActual != urlFotoAnterior)
{
urlFotoAnterior = urlFotoActual;
document.getElementById("photo-actions-remove").click();
View TuentiPhotoUntag.js
var urlFotoAnterior = "";
var interval = setInterval(function() {
try {
var urlFotoActual = document.getElementById("photo_image").getAttribute("src");
if (urlFotoActual != urlFotoAnterior)
{
urlFotoAnterior = urlFotoActual;
document.querySelector("#edit_tag_list .js-deleteTag .avatar").click();
View getMonthDays.js
// without lookup table
function getMonthDays_A (month, year)
{
if (month === 1)
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0) ? 29 : 28;
if (month % 2)
return month > 6 ? 31 : 30;
return month > 6 ? 30 : 31;
View TuentiCommentAutoDelete.js
var intervalo = null;
function DeleteCommentInterval()
{
try {
var coment = document.querySelector("#wallpost-list .itm-actions-trans button.action")
if (coment == null)
{