Skip to content

Instantly share code, notes, and snippets.

@gajmp
gajmp / chat-frontend.js
Created November 8, 2018 10:47 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
[
'{{repeat(10000, 10000)}}',
{
"CaseId": '{{guid}}',
"CaseAddressString": '{{numeric(100,999)}} {{street}}, {{city}}',
"CaseOpenDatetime" :
function StatusDate(idx){
var d = new Date();
var x = this.numeric(10,1);
d.setDate(d.getDate() - x);
@gajmp
gajmp / gist:46bccf45c0afd0a9f658436196bb5975
Created November 1, 2016 04:58 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*