Skip to content

Instantly share code, notes, and snippets.

@nkbt
nkbt / .eslintrc.js
Last active July 21, 2025 17:55
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@denji
denji / golang-tls.md
Last active November 21, 2025 23:40 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@jackdoerner
jackdoerner / riesz_pyramid.py
Last active March 1, 2023 01:04
Riesz Pyramid Creation and Reconstruction in Python
"""
riesz_pyramid.py
Conversion between Riesz and Laplacian image pyramids
Based on the data structures and methodoligies described in:
Riesz Pyramids for Fast Phase-Based Video Magnification
Neal Wadhwa, Michael Rubinstein, Fredo Durand and William T. Freeman
Computational Photography (ICCP), 2014 IEEE International Conference on
Copyright (c) 2016 Jack Doerner
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@ducnt0
ducnt0 / dict.cpp
Created December 18, 2012 23:11
Simple hash table implemented in C++ for string/string key-value pair. DictADT can have duplicated keys. Not optimized for speed, only for demonstration.
#include <iostream>
#include <string>
#include <queue>
using namespace std;
class MapADT {
public:
MapADT();
MapADT(string filename);
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 24, 2025 16:51
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname