Skip to content

Instantly share code, notes, and snippets.

View fuadnafiz98's full-sized avatar
:octocat:

Md. Muhtasim Fuad fuadnafiz98

:octocat:
View GitHub Profile
@Globik
Globik / index.html
Created May 1, 2017 15:27
Websocket multi room based on ws.js
<html>
<body>
<h4>websocket</h4>
<h5>Group: <span id="group">darwin</span></h5>
<!-- a hardoced group name -->
<button onclick="bjoin();">join group</button><br>
<input id="text" type="text"/>
<span id="out"></span>
<script>
var group=document.getElementById("group").textContent;

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@v0lkan
v0lkan / nginx.conf
Last active April 2, 2024 18:25
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@nkbt
nkbt / .eslintrc.js
Last active April 23, 2024 03:19
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@mattupstate
mattupstate / README.md
Created November 13, 2014 17:14
An example of how to setup streaming replication for PostgreSQL with Docker.

PostgreSQL Streaming Replication With Docker

The *.txt files here hold user and database parameters. Specifically, replication.txt contains the user/role and password to use for replication. Whereas database.txt contains an initial database, user/role and password to create on the master.

Run the master:

$ fig run -d master

Wait for it to start up completely. Start the slave: