Skip to content

Instantly share code, notes, and snippets.

View asuna's full-sized avatar
🏠
Working from home

asuna asuna

🏠
Working from home
View GitHub Profile
@rajkosto
rajkosto / odi_keygen.py
Created November 18, 2022 12:56
ODI SFP XPON stick MAC_KEY generator
#!/usr/bin/env python3
#ODI DFP-34X-2C2 MAC_KEY key generator by rajkosto
import sys
import string
import hashlib
args = sys.argv
if len(args) != 2:
sys.exit("Usage: odi_keygen.py YOURMACADDR")
@mmozeiko
mmozeiko / !README.md
Last active July 2, 2024 19:21
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.40.33807 and v10.0.26100.0.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@ppoffice
ppoffice / xstartup
Last active May 5, 2024 04:56
VNC xstartup for Ubuntu Desktop (Gnome)
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
export DESKTOP_SESSION=/usr/share/xsessions/ubuntu.desktop
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
dbus-launch --exit-with-session /usr/bin/gnome-session --systemd --session=ubuntu
@syhily
syhily / bootstrap.sh
Last active June 4, 2022 15:58
How to use docker talebook with MySQL.
#!/usr/bin/env bash
# Patch current talebook for adding permission
grep -qxF 'user.permission = ' /var/www/talebook/webserver/handlers/user.py || sed -i '/user.email = email/a \ \ \ \ \ \ \ \ user.permission = '\''DEPRU'\''' /var/www/talebook/webserver/handlers/user.py
# Start talebook
source /var/www/talebook/docker/start.sh
@bzerangue
bzerangue / home-assistant-x86-install.md
Last active July 4, 2024 16:44
Using Live Image of ZorinOS/Ubuntu/Linux Mint to Create Home Assistant OS boot drive - for x86 machines

Installing the official Home Assistant OS on an old x86 PC.

This is not a support document. Not responsible for whomever might use this. This put down for my personal use and if anyone else wants to use it they can, but this process will remove any data from the target device they are installing on.

REQUIREMENTS:

  • Intel or AMD x86 PC, monitor, keyboard, internet connection via ethernet.
  • Bootable USB thumb drive of the latest dekstop version of ZorinOS, Ubuntu, or Linux Mint
  1. Boot your machine with the bootable Zorin OS and select Try Zorin OS (you do NOT want to install it)
@marcelrv
marcelrv / _docker-migrate-aufs.md
Last active February 5, 2024 00:21
Docker migrate to overlay2 from aufs script

Docker migrate to overlay2 from aufs script

Crazy that this is pretty much forced change without proper transition script

note. Based on https://www.sylvaincoudeville.fr/2019/12/docker-migrer-le-stockage-aufs-vers-overlay2/ NOT WORKING!!!! IF FOLLOWING THE ABOVE.. SOMEHOW THE CONTAINERS DO NOT RE-APPEAR!

The only way I found that is somewhat automated is the the docker-compose way..

Which is still not 100% and require manual fixing of stupid errors of the docker-compose tool (mainly things that ere not interpreted right, like dates & userIds that need to manually surrounded by quotes etc)

@cidermole
cidermole / jenkins-agent.service
Last active February 20, 2024 11:53
Systemd service file for Jenkins agent on Ubuntu 20.04 Focal Fossa
# Steps to install Jenkins Agent using JNLP connection on Ubuntu 20.04 Focal Fossa
#
# * create an Agent node on the web GUI: https://wiki.jenkins.io/display/JENKINS/Step+by+step+guide+to+set+up+master+and+agent+machines+on+Windows
# * $ sudo apt-get install -y openjdk-14-jre-headless
# * $ sudo adduser jenkins
# * $ curl http://jenkins-master.internal/jnlpJars/agent.jar -o /home/jenkins/agent.jar
# * create systemd service: place this file in /lib/systemd/system/jenkins-agent.service
# * $ sudo systemctl enable myservice
# * $ sudo systemctl start jenkins-agent
@Anime4000
Anime4000 / advanced_conf-telnet.md
Last active February 17, 2024 06:09
XPON SFP ONU (V2801F), XPON STICK ONU (TWCGPON657), RTL8672, RTL9601C1
@HeshamMeneisi
HeshamMeneisi / docker-compose
Last active September 13, 2023 21:47
Mount S3 as Docker Volume (docker-compose)
# Tip: You can just define all environment variables used here in a
# .env file in the same directory so as not to expose secrets
# docker-compose will load it automatically
services:
s3fs:
privileged: true
image: efrecon/s3fs:1.86
restart: always
environment:
- AWS_S3_BUCKET=${AWS_S3_BUCKET}
@dhondta
dhondta / README.md
Last active April 22, 2024 01:22
Tinyscript tool to bruteforce the password of a PDF

PDF password bruteforcer

This is a small tool using Tinyscript and pypdf or pikepdf to bruteforce the password of a PDF given an alphabet (defaults to printables) and a length (default is 8).

$ pip install pypdf tinyscript
$ tsm pdf-password-bruteforcer