Skip to content

Instantly share code, notes, and snippets.

@eldorplus
eldorplus / pxe_win10_winpe.md
Created November 4, 2021 15:49 — forked from rikka0w0/pxe_win10_winpe.md
Boot Windows 10 and WinPE from PXE (IPXE)

Pre-requests:

  1. TFTP server
  2. IPXE Make sure ipxe.lkrn is in the TFTP root.
  3. iSCSI target (Server) Assume we have an iSCSI target "1:net.cszombie.au:windows" that is ready to be connected. 1 is LUN id, "net.cszombie.au:windows" is the target name.
  4. HTTP server (To speed up loading boot.wim, http is faster than tftp, http is supported by IPXE, however this is optional)

1. Download wimboot to the root of the TFTP server

2. Create scripts:

@eldorplus
eldorplus / Readme.md
Created November 4, 2021 15:25 — forked from felixkrohn/Readme.md
centos8 @ OVH/SoYouStart/Kimsufi

centos8 @ OVH/SoYouStart/Kimsufi

How to install CentOS 8 on OVH/SoYouStart/Kimsufi

  • connect to the OVH/SoYouStart/Kimsufi API and create a ipxe script under https://eu.api.kimsufi.com/console/#/me/ipxeScript#POST or equivalent, see centos8.ipxe below
  • boot your server from this netboot, and ping it to follow the process. If you can observe the webserver's logs you will se your server's IP pulling kernel and initrd with "iPXE" user agent, then it will start pinging, and retrieve the kickstart.cfg a bit later (with "curl" user agent). This is the moment when you could set your server back to "Boot from Hard Disk".
  • Also at this point you can connect to your server with SSH using the key/password set in the kickstart file. type tmux a to attach the install's tmux session and follow the progress. For debugging, check the logs in /tmp and those sent over syslog.

upstream documentation

@eldorplus
eldorplus / helpful-docker-commands.sh
Created September 22, 2021 14:49 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@eldorplus
eldorplus / main.js
Created July 14, 2021 11:02 — forked from tetrashine/main.js
onVideoComplete
await this._page.evaluateOnNewDocument(() => {
let checkWatchTimeFunc = () => {
let currElem = document.getElementsByClassName('ytp-time-current'); //grab the element showing current play time
let maxElem = document.getElementsByClassName('ytp-time-duration'); //grab the element showing total play time
if (
currElem.length > 0 && maxElem.length > 0 //check if there are any such element
&& currElem[0].innerText === maxElem[0].innerText //compare the value between the 2 elements
) {
@eldorplus
eldorplus / youtube_m3u.ipynb
Created July 10, 2021 00:52 — forked from Temetra/youtube_m3u.ipynb
Convert YouTube channel videos to M3U playlist
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eldorplus
eldorplus / m3u8-to-youtube-live.md
Created July 10, 2021 00:15 — forked from qntmpkts/m3u8-to-youtube-live.md
Restream m3u8 stream with ffmpeg to youtube live

Setup YouTube Live Event

Head on over to your YouTube live Events page (https://www.youtube.com/my_live_events).

Create a new live event that is unlisted (or private) and of Custom type.

Under Basic ingestion choose 1500 Kbps - 4000 kbps (720p).

Check the Enable 60fps box.

import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk
class ControlPanel(Gtk.Box):
def __init__(self):
super().__init__(orientation=Gtk.Orientation.VERTICAL, spacing=5)
# Place the control panel in the top right
self.set_halign(Gtk.Align.END)
@eldorplus
eldorplus / starhscale.py
Created May 27, 2021 10:44 — forked from mendhak/starhscale.py
A custom GTK widget; horizontal slider with stars for rating an item
#!/usr/bin/env python
"""
StarHScale a Horizontal slider that uses stars
Copyright (C) 2006 Mark Mruss <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@eldorplus
eldorplus / app.py
Created May 20, 2021 23:18 — forked from carlos-jenkins/app.py
Example to set to a Gtk application a custom theme.
# -*- coding:utf-8 -*-
#
# Copyright (C) 2013 Carlos Jenkins <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@eldorplus
eldorplus / skipAds.js
Created March 27, 2021 11:23 — forked from codesorter2015/skipAds.js
How to automatically skip youtube Ads using puppeteer?
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless:false});
const page = await browser.newPage();
let url = 'youtube url';
await page.goto(url);
await page.evaluate(() => {
self.moHandler = {
changesObserver: function (mutation) {
if (mutation.type === 'attributes'){