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 / sqlalchemy_example.py
Created November 7, 2023 16:47 — forked from ronreiter/sqlalchemy_example.py
SQLAlchemy Example
from sqlalchemy import Column, Integer, String, ForeignKey, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, backref, sessionmaker, joinedload
# For this example we will use an in-memory sqlite DB.
# Let's also configure it to echo everything it does to the screen.
engine = create_engine('sqlite:///:memory:', echo=True)
# The base class which our objects will be defined on.
Base = declarative_base()
@Poxios
Poxios / ArchOracleCloud.md
Created October 12, 2023 06:55 — forked from amishmm/ArchOracleCloud.md
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
@Poxios
Poxios / convert1.sh
Created September 6, 2023 16:25 — forked from zengxinhui/convert2arch_arm.sh
Replace Oracle Cloud Linux with Arch Linux ARM remotely
Refs:
1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-virt-3.13.5-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
Requirement:
Console access.
@Poxios
Poxios / aligning-images.md
Created September 19, 2022 05:44 — forked from DavidWells/aligning-images.md
Guide to aligning images in github readme.md files. https://davidwells.io/snippets/how-to-align-images-in-markdown

Aligning images

left alignment

This is the code you need to align images to the left:

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@Poxios
Poxios / git-move-files-in-subfolder.md
Created May 8, 2022 08:29 — forked from ajaegers/git-move-files-in-subfolder.md
Git: move files in an subfolder keeping history

Change structure of project folder with Git

I have this structure:

 project-folder/
     .git
     wp-admin/
     wp-content/
     wp-includes/

.htaccess

@Poxios
Poxios / ffmpeg-mp4-to-animated-webp.md
Created May 28, 2021 16:09 — forked from witmin/ffmpeg-mp4-to-animated-webp.md
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@Poxios
Poxios / bypass_distil_security_selnium.py
Created April 11, 2021 11:22 — forked from 4sushi/bypass_distil_security_selnium.py
Bypass distil security with Selenium python
"""
Example to bypass distil security (https://www.distilnetworks.com/) with Selenium.
They use the javascript field navigator.webdriver to ban Selenium
The solution is to inject javascript code before the laoding og the webpage, to set webdriver to false
Works only with chromium driver
"""
from datetime import datetime
import os
import sys