Skip to content

Instantly share code, notes, and snippets.

View gieoon's full-sized avatar

gieoon gieoon

View GitHub Profile
alert("loading and executing external script from github!!!");
@gieoon
gieoon / download_youtube.py
Created July 26, 2022 15:29
Download Youtube videos by pasting in URL
"""
Run this code via
$ python download_youtube.py <youtube_url>
Requires downloading ffmpeg
$ sudo apt install ffmpeg
Sometimes ipv6 needs to be switched off.
$ sudo sysctl net.ipv6.conf.all.disable_ipv6=1
@gieoon
gieoon / tinydatauri.py
Last active June 5, 2022 14:32
Tiny SVG Data URI
"""
Converts standard SVG data uri into a tiny one as per:
https://github.com/tigt/mini-svg-data-uri
"""
import urllib.parse
import re
@gieoon
gieoon / child.jsx
Last active April 18, 2021 22:56
Experimenting with calling an iframe from parent and responding in client and returning data.
import React, {useEffect, useState, ReactDOM} from 'react';
import {useLocation} from 'react-router-dom';
// This is shared code for all CMS listeners.
// Listens to events from login.<domain-name>.craftie.xyz,
// Edits the page after events are received.
import Quill from 'quill';
// import ReactQuill from 'react-quill';
// import 'react-quill/dist/quill.snow.css';
import getCssSelector from 'css-selector-generator';