Skip to content

Instantly share code, notes, and snippets.

View medival's full-sized avatar
🚀
exploring the universe

Adi Purnomo medival

🚀
exploring the universe
View GitHub Profile
@medival
medival / GPG and git on macOS.md
Created June 26, 2020 13:20 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@medival
medival / install-rabbitmq-centos-7.md
Last active March 17, 2021 21:08 — forked from fernandoaleman/install-rabbitmq-centos-7.md
Install RabbitMQ on CentOS 7

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

# Single target scan:
nmap [target]
# Scan from a list of targets:
nmap -iL [list.txt]
# iPv6:
nmap -6 [target]
# OS detection:
@medival
medival / sources.list
Created June 5, 2021 23:38 — forked from h0bbel/sources.list
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@medival
medival / cron_clean.sh
Created June 17, 2022 13:56 — forked from ariellephan/cron_clean.sh
Shell script to keep system clean
#!/bin/bash
OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"
@medival
medival / nginx.conf
Created June 19, 2022 07:17 — forked from uupaa/nginx.conf
nginx: Avoid CORS and reverse proxy settings
http {
server {
listen 8080;
server_name localhost;
charset UTF-8;
# Avoid CORS and reverse proxy settings
# [1] xhr request: http://localhost:8080/api/xxx/yyy/zzz
# [2] /api/xxx/yyy/zzz
# [3] http://your-dev-server.example.com/api/xxx/yyy/zzz