Skip to content

Instantly share code, notes, and snippets.

View olbboy's full-sized avatar
💭
🏆

mds olbboy

💭
🏆
View GitHub Profile
@olbboy
olbboy / introrx.md
Created July 7, 2016 22:17 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@olbboy
olbboy / 1. Install Redis
Created December 22, 2017 21:31 — forked from pbolduc/1. Install Redis
Install redis on CentOS 7
# see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/
# --- Compiling ---
$ yum install gcc make tcl
$ REDIS_VER=3.2.3
$ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz
$ tar xzvf redis-$REDIS_VER.tar.gz
$ cd redis-$REDIS_VER
$ make
$ make test
@olbboy
olbboy / installing-node-with-nvm.md
Created August 17, 2021 08:54 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
# Install qemu
apt-get update && apt-get install qemu -y
apt install qemu-utils
apt install qemu-system-x86
# Create disk image
qemu-img create -f raw windows10.img 16G
# Get virtio drivers
wget -O virtio-win.iso 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.185-2/virtio-win-0.1.185.iso'
@olbboy
olbboy / self-signed_ssl.txt
Created January 5, 2022 18:28 — forked from jelinden/self-signed_ssl.txt
Jetty self-signed ssl certification
sudo openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.old
openssl rsa -in server.key.old -out server.key
sudo openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
sudo openssl pkcs12 -inkey server.key -in server.crt -export -out server.pkcs12
keytool -importkeystore -srckeystore server.pkcs12 -srcstoretype PKCS12 -destkeystore keystore
keytool -list -v -keystore keystore
java -cp /jetty-8.1.3/lib/jetty-util-8.1.3.v20120416.jar org.eclipse.jetty.util.security.Password password
@olbboy
olbboy / tpbd
Created February 11, 2022 06:52
.
├── Quần nữ
│ ├── Quần lụa thường
│ ├── Quần váy
│ ├── Quần lửng
│ ├── Quần tico
│ ├── Quần trắng
│ ├── Quần trắng nữ
│ ├── Quần đen
│ ├── Quần liền tà
const minute = 60;
const hour = minute * 60;
const day = hour * 24;
const week = day * 7;
const month = day * 30;
const year = day * 365;
/**
* Convert a date to a relative time string, such as
* "a minute ago", "in 2 hours", "yesterday", "3 months ago", etc.
@olbboy
olbboy / haproxy_letsencrypt.md
Created May 12, 2022 11:20 — forked from lmmendes/haproxy_letsencrypt.md
# HAProxy and Let's Encrypt

HAProxy and Let's Encrypt

HAProxy is a open-source TCP/HTTP load-balancing proxy server supporting native SSL, keep-alive, compression CLI, and other modern features.

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. Let’s Encrypt is a service provided by the Internet Security Research Group (ISRG).

Concept

@olbboy
olbboy / flatten-response.js
Created September 21, 2022 04:36 — forked from hucancode/README.md
Flatten Strapi 4's response JSON
// src/middlewares/flatten-response.js
function flattenArray(obj) {
return obj.map(e => flatten(e));
}
function flattenData(obj) {
return flatten(obj.data);
}
function flattenAttrs(obj) {