Skip to content

Instantly share code, notes, and snippets.

@eliangcs
eliangcs / http-prompt-story.md
Last active June 3, 2020 06:49
How I created HTTP Prompt and got 5000+ stars on GitHub

How I Created HTTP Prompt and Got 5000+ Stars on GitHub

Two months ago, I published an open source project, which went viral by gaining 1200+ stars in the first 24 hours. As of this writing, it has attracted 5000+ stars. The project is called HTTP Prompt:

https://github.com/eliangcs/http-prompt

Here I want to share its development story.

It all began with Vertica. Not long ago, I used Vertica every day for my work. Vertica is a powerful database, but the official client (vsql) is not powerful at all. The GUI alternative, DbVisualizer, is bad as well.

@eliangcs
eliangcs / secure-django-admin.rst
Last active June 8, 2021 16:10
Secure Django admin with self-signed SSL client certificate in Nginx.
@eliangcs
eliangcs / linode-security.md
Last active January 11, 2022 23:09
Basic security setup for a brand new Linode

Basic Security Setup for a Brand New Linode

Why

When you start a clean Linode, it isn't secured in the following aspects:

  • Allows root SSH login
  • Uses password authentication on SSH
  • Doesn't have a firewall
@eliangcs
eliangcs / genfile_to_s3.py
Created August 15, 2022 04:49
Generate a file dynamically and upload it to S3
import os
from io import BytesIO
import boto3
BUCKET = 'bucket-name'
def gen_int():
a = 0
@eliangcs
eliangcs / ensure_json_encodable.js
Created May 17, 2023 05:25
How to ensure a value is JSON encodable (Node.js)
const assert = require('assert');
const _ = require('lodash');
const ensureJSONEncodable = (obj, path = null, visited = null) => {
if (obj === null || _.isBoolean(obj) || _.isNumber(obj) || _.isString(obj)) {
return;
}
path = path || [];
@eliangcs
eliangcs / pyenv+virtualenv.md
Last active June 8, 2023 07:46
Cheatsheet: pyenv, virtualenvwrapper, and pip

Cheatsheet: pyenv, virtualenvwrapper, and pip

Installation (for Mac OS)

Install pyenv with brew

brew update
brew install pyenv