Skip to content

Instantly share code, notes, and snippets.

View identor's full-sized avatar
🌴
On vacation

Irvin Denzel Torcuato identor

🌴
On vacation
View GitHub Profile
@identor
identor / chatserver.js
Created March 23, 2015 11:22
Share ko lang po sa mga nag aaral ng JavaScript. Pwede din kayo mag Socket programming (NodeJS), eto multi client chat server.
var net = require('net');
var clients = [];
net.createServer(function (socket) {
clients.push(socket);
socket.write('Who are you? ');
socket.on('data', function (message) {
if (!socket.chatname)
return socket.chatname = message.toString().trim();
clients.forEach(function (client) {
@identor
identor / beaver.conf
Last active August 29, 2015 14:15
Basic Apache httpd configuration for Beaver.
<VirtualHost beaver.localhost:80>
ProxyPreserveHost Off
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
@identor
identor / EmployeeCrud.js
Last active August 29, 2015 14:15
Recipe for Employee CRUD methods.
/* Get: all */
Employee.query(
function success(employees, httpResponse) {},
function error(error) {}
);
/* Query specify parameter. Resoves to /api/employees?firstName=Irvin123 */
Employee.query({firstName: 'Irvin123'}, function success(data) {
console.log(data);
});
@identor
identor / designer.html
Created August 1, 2014 14:24
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;