Skip to content

Instantly share code, notes, and snippets.

View mohammadhb's full-sized avatar
🚬
Smoking Binaries to Ashes

Mohammad Hosein Balkhani mohammadhb

🚬
Smoking Binaries to Ashes
  • @CarpinoTaxi @usc-devs
  • GNU/Linux Kernel
  • 21:20 (UTC +03:30)
View GitHub Profile
@mohammadhb
mohammadhb / vscode.json
Created May 2, 2023 13:23
Clean Code Rules
{
// Most code lines should be 40~80 column long after 150 col is not acceptable.
// And the reader have to scroll to the right
"editor.rulers": [
40,
80,
150
],
}
@mohammadhb
mohammadhb / singleton.js
Last active August 3, 2022 15:54
Javascript ES6 Singleton pattern with pure class
class Counter {
static instance;
static getInstance(){
if(!Counter.instance) Counter.instance = new Counter();
return Counter.instance;
}
counter = 0;
getCount() {

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

echo pass | sudo openconnect c9.serverkm.xyz:443 --user=user --passwd-on-stdin --script=/etc/vpnc/vpnc-script
const {performance} = require('perf_hooks');
const start = performance.now();
//Your Code Lays Here :)
const end = performance.now();
/*
cte : Constant to make 0 < (end-start) < 1 when there is no code
* it's just for better understanding ( if you dont want it leave it to be )
@mohammadhb
mohammadhb / nginx-owasp.conf
Last active February 14, 2018 13:57 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048