Skip to content

Instantly share code, notes, and snippets.

View ohmrefresh's full-sized avatar

Ohm ohmrefresh

  • Bangkok, Thailand
View GitHub Profile
@ohmrefresh
ohmrefresh / rms.sh
Created March 3, 2022 02:14
Redis Memory Analyzer
rma -s {{host}} -p 6379 -b all
Match *: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 91/91 [00:00<00:00, 1052.08it/s]
Aggregating keys by pattern and type
Apply rules
WARNING:rma.rule.GlobalKeySpace:*max* option skipped: ResponseError("unknown command 'CONFIG'")
Processing String patterns: 0%| | 0/115 [00:00<?, ?it/s]WARNING:rma.rule.ValueString:ResponseError("unknown command 'DEBUG'")
@ohmrefresh
ohmrefresh / medis_build.sh
Created January 25, 2021 11:09
medis build as binary
git clone https://github.com/luin/medis.git
cd medis
npm i
npm run pack
# Ctl +C
node bin/pack.js
cd dist/out/Medis-mas-x64/
open .
@ohmrefresh
ohmrefresh / nginx.conf
Created December 29, 2020 08:39
Nginx Proxy to Cloudfront
server {
listen 8443 ssl;
server_name localhost;
ssl_certificate tls.crt;
ssl_certificate_key tls.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@ohmrefresh
ohmrefresh / sample.bash
Created December 15, 2020 15:25
Lighthouse CI Demo
➜ demo ./build.sh
✅ .lighthouseci/ directory writable
✅ Configuration file found
✅ Chrome installation found
⚠️ Ancestor hash not determinable
✅ LHCI server reachable
✅ LHCI server API-compatible
✅ LHCI server token valid
✅ LHCI server unique build for this hash
Healthcheck passed!
{
"ci": {
"server": {
"port": 9001,
"storage": {
"storageMethod": "sql",
"sqlDialect": "sqlite",
"sqlDatabasePath": "/data/lhci.db"
}
}
@ohmrefresh
ohmrefresh / package.json
Created August 29, 2020 07:10
demo config react component project
{
"name": "component-a",
"version": "1.0.0",
"description": "Made with create-react-library",
"author": "ohmrefresh",
"license": "MIT",
"repository": "ohmrefresh/component-a",
"main": "dist/index.js",
"module": "dist/index.modern.js",
"source": "src/index.js",
@ohmrefresh
ohmrefresh / .npmrc
Last active September 17, 2020 15:26
This file is a configuration file for NPM for demo
registry=http://127.0.0.1:8081/repository/npm-group/ #Nexus URL (private)
_auth=dXNlcjpwYXNzd29yZAo= ##echo -n 'user:password'| openssl base64
[email protected] #email
always-auth=true
init.author.name = ohmrefresh
init.author.email = [email protected]
@ohmrefresh
ohmrefresh / git-commit-log-stats.md
Created March 29, 2020 10:02 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@ohmrefresh
ohmrefresh / tcp_flags.txt
Created December 12, 2019 13:57 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
app01 ClusterIP 172.30.65.144 <none> 8443/TCP 1d