Skip to content

Instantly share code, notes, and snippets.

View Poxios's full-sized avatar
🥳
Happy

YoungHyun Cho Poxios

🥳
Happy
  • Seoul, South Korea
  • Instagram 0hyun.c
View GitHub Profile
@Poxios
Poxios / traefik-with-https-docker-compose.yml
Created November 3, 2022 06:50
Full docker-compose file for Traefik with secure settings
# Simple docker-compose file example for Traefik
# Feature: Let's encrypt(ACME), Log(Debug level), Secure Dashboard(https connection, require password), Redirect http requests to https, Example docker container connection(whoami)
# @Poxios, 2022
version: '3'
services:
reverse-proxy:
image: traefik
container_name: reverse-proxy
@amishmm
amishmm / ArchOracleCloud.md
Last active April 24, 2024 11:00
Install Arch Linux on Oracle Cloud (Free Tier)

Requirement

  • Console / Cloud Shell access (via https://cloud.oracle.com)
  • Go to the instance page and under Resources -> Console connection -> Launch Cloud Shell connection

Steps

  1. In Ubuntu OR any other Free tier Linux OS
# Download Alpine Linux and install it on disk
cd /
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso
@karolba
karolba / alpine-on-stardust-no-rescue.md
Last active November 12, 2023 16:47
Install Alpine Linux on Scaleway Stardust without the rescue image using https://netboot.xyz

A way to install Alpine Linux on a Scaleway Stardust instance without the use of a rescue image, but by booting into the install image over the network using https://netboot.xyz.

  1. Connect to the serial console, using scw instance server console {uuid} zone={zone}

  2. Reboot the VM into UEFI settings

    • either by executing systemctl reboot --firmware on the machine
    • or by using scw instance server reboot {uuid} zone={zone} locally and repeatedly mashing the escape key on the serial console image
  3. Go to Device Manager -> Network Device List -> the only network device -> HTTP Boot Configuration -> Boot URI

@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active January 28, 2024 08:19
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@bulletinmybeard
bulletinmybeard / fix-for-sudo-command-error-unable-to-initialize-pam-no-such-file-or-directory.md
Last active April 8, 2024 08:16
macOS - Fix for sudo command error: "unable to initialize PAM: No such file or directory" (Intel+M1)

In most cases, the sudo command displays the error unable to initialize PAM: No such file or directory mostly appears when the pluggable authentication module file /etc/pam.d/sudo has been edited with a typo or an incorrect PAM module.

Via Single-User-Mode > Terminal

If you have an older Mac, you can boot into single-user mode, which allows you to access the command line mode of macOS directly, bypassing the UI.

  • Press and hold down the COMMAND + S keys until you see commands being executed in the Terminal.

  • Open the sudo file with vi /Volumes/Macintosh\ - Data/etc/pam.d/, fix what's wrong, save and close the file by switching from INSERT to the COMMAND mode with the ESC key, type :wq!, and hit enter.

@idleberg
idleberg / vscode-macos-context-menu.md
Last active May 9, 2024 09:05
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@zengxinhui
zengxinhui / convert2arch_arm.sh
Last active March 8, 2024 23:41
Replace Oracle Cloud Linux with Arch Linux ARM remotely
[09/23/2023]
Refs:
1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/aarch64/alpine-virt-3.18.0-aarch64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
5. https://archlinuxarm.org/platforms/armv8/generic
See also:
@sht
sht / check_github_users.py
Last active February 3, 2024 08:28
to check weather a given username in the file exist on github or not
import string, random, requests, json
def generateUser(size=3, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
for x in range(200):
user = generateUser()
try:
jsonData = json.loads(
requests.get(f"https://api.github.com/users/{user}").text
@justinbiebur
justinbiebur / ProtectedRoute.js
Created August 25, 2020 09:53
a part of the medium article on firebase auth and react-router.
import React, { useContext } from 'react';
import {AuthContext}from './firebaseAuthContext';
import {Route,Redirect} from 'react-router-dom';
export default function ProtectedRoute(props){
const authValue=useContext(AuthContext)
if (authValue.userDataPresent){
if(authValue.user==null){
return(<Redirect to={props.redirectTo}></Redirect>)
@oofnikj
oofnikj / answerfile
Last active May 14, 2024 11:27
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"