Skip to content

Instantly share code, notes, and snippets.

View Cyxo's full-sized avatar
💭
j'aime les nouilles

Cyxo Cyxo

💭
j'aime les nouilles
View GitHub Profile
@Cyxo
Cyxo / twitch-autoclaim.user.js
Last active February 3, 2023 11:08
Twitch Autochest
// ==UserScript==
// @name Twitch Autoclaim
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the world!
// @author You
// @include https://www.twitch.tv/*
// @grant none
// ==/UserScript==
@Cyxo
Cyxo / generate_pem.py
Last active May 23, 2020 15:22
A Python3 script to generate a PEM private key file from p, q and e. Adapted from the Python2 code here: https://0day.work/how-i-recovered-your-private-key-or-why-small-keys-are-bad/
#!/usr/bin/python3
import pyasn1.codec.der.encoder
import pyasn1.type.univ
import base64
def recover_key(p, q, e, output_file):
"""Recoveres a RSA private key from:
p: Prime p
q: Prime q
e: Public exponent
@Cyxo
Cyxo / ldap2zm.py
Created April 5, 2020 22:08
Creates Zimbra account for each account in an LDAP directory (run as root on the Zimbra server, or put in the crontab)
import random
import subprocess as sp
from time import sleep
import re
# Change these parameters for your own configuration
LDAP_URL="ldap://ldap.internal.example.com:389"
BASE_DN="ou=people,dc=example,dc=com"
FILTER="(objectClass=inetOrgPerson)" # This is a filter to get only people, change for your own case
ATTR=["uid", "givenName", "sn"]
@Cyxo
Cyxo / codingame_header.user.js
Last active December 10, 2020 01:28
A Userscript to add a random animal ASCII art to CodinGame's IDE
// ==UserScript==
// @name Codingame Header
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Places a random animal ASCII art in the header of CodingGame's IDE
// @author Cyxo
// @include http*://*codingame.com/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
@Cyxo
Cyxo / live_radio.sh
Last active April 30, 2024 16:46 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube