Skip to content

Instantly share code, notes, and snippets.

View Sensational-Code's full-sized avatar
:shipit:
Being sensational

Sensational Code Sensational-Code

:shipit:
Being sensational
View GitHub Profile
@siliskin
siliskin / server.js
Created July 13, 2012 22:38 — forked from alaingilbert/server.js
EventSource server with nodejs
var http = require('http')
, fs = require('fs')
, PORT = process.argv[2] || 8080
, HOST = process.argv[3] || '127.0.0.1';
http.createServer(function (req, res) {
if (req.url == '/events') {
res.writeHead(200, { 'Content-Type' : 'text/event-stream'
, 'Cache-Control' : 'no-cache'
@james-brndwgn
james-brndwgn / components.md
Last active May 19, 2021 17:28 — forked from iclanzan/components.md
UI Component Name Ideas

UI component names

Interactive components

  • button
  • switch
  • toggle
  • slider
  • handle
  • tab
@daffl
daffl / app.js
Last active January 6, 2022 16:43
Socket.io counter acknowledgement example
const app = require('express')();
const http = require('http').Server(app);
const io = require('socket.io')(http);
let counter = 0;
app.get('/', function(req, res){
res.sendFile(__dirname + '/index.html');
});