Skip to content

Instantly share code, notes, and snippets.

View Axeltherabbit's full-sized avatar
💀
dead

Axel Axeltherabbit

💀
dead
View GitHub Profile
@Axeltherabbit
Axeltherabbit / .vimrc
Last active July 18, 2020 10:18
python vimrc
"I use this vimrc for python
"you just need to install Vundle and run :PluginInstall into this file
"then complete the installation of Valloric/YouCompleteMe manually
"and install pylint, mypy, black in your python env
"If something goes wrong read the errors and fix them all :D
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
@Axeltherabbit
Axeltherabbit / YTPlaylistParser.py
Last active September 9, 2024 18:21 — forked from fffaraz/bs4.py
Python YouTube Playlist Link Collector
#regex original source http://code.activestate.com/recipes/578284-youtube-playlist-parserextractor/
#fork of https://gist.github.com/fffaraz/f3dcf48ae93b6c04adb9d74b1de711e5
#if you want to stream a yt-playlist with vlc use "python parser.py URLHERE -o playlist.m3u && cvlc --no-video playlist.m3u"
import re
import requests
import argparse
@Axeltherabbit
Axeltherabbit / godotoldvideo.shader
Last active September 23, 2020 10:02
Old film shader for godot
shader_type canvas_item;
//original author : Wagner https://github.com/spite/Wagner/blob/master/fragment-shaders/old-video-fs.glsl
//original shader in godot2: airvikar https://www.youtube.com/watch?v=KlyTvUE2WJI
//translation from godot2 to godot3 : axeltherabbit https://gist.github.com/Axeltherabbit/f8075aba20096fd2f5b5206d97b9fc8c
float randi(vec2 co){return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);}
float rand(float c){return randi(vec2(c,1.0));}
float randomLine(float seed, vec2 uv){
float b= 0.01*rand(seed);
float a= rand(seed+1.0);
import praw
import prawcore
import argparse
import time
from functools import wraps
from socket import error as SocketError
#######################################################################################
###the latest version is on github https://github.com/Axeltherabbit/RedditIDsGrabber###
#######################################################################################
#!/bin/bash
#this is a custom file of the original source https://gist.github.com/hernamesbarbara/1937937
export TERM=xterm-color
export CLICOLOR=1
# export LSCOLORS=Exfxcxdxbxegedabagacad
@Axeltherabbit
Axeltherabbit / parser.py
Last active March 29, 2021 04:32
simple lichess puzzle database parser
from csv import reader
import sys
# puzzle database https://database.lichess.org/#puzzles
with open("lichess_db_puzzle.csv", "r") as f:
rating = int(sys.argv[1]) if len(sys.argv) > 1 else 1500
deviation = int(sys.argv[2]) if len(sys.argv) > 2 else 100
csv_reader = reader(f)
res = []
for row in csv_reader:
from PIL import Image
# 1 is white
# 0 is black
m = [
[0],
]
print("generating")
for _ in range(10000):
@Axeltherabbit
Axeltherabbit / Telegram-groupchat-stast.py
Last active March 31, 2022 15:56
Messy code but it creates a list with user's messages stats from a telegram group's exported json file
import json
from collections import namedtuple
class person:
def __init__(self, _id, username):
self.id = _id
self.username = username
self.msgs_len = []
#alias
alias xcopy='xclip -selection clipboard'
alias xpaste='xclip -selection clipboard -o'
alias ls='ls --color=auto'
alias vi='vim'
alias hg='history | grep'
alias replacegnome='gnome-shell --wayland --replace'
alias ssh_github_login='ssh -T [email protected]'
PS1='\[\033[01m\][ \[\033[01;34m\]\u@\h \[\033[00m\]\[\033[01m\]][\e[33m\]^_^\[\e[0m\]] \w\[\033[00m\]\n\[\033[01;34m\]$\[\033[00m\]> '
@Axeltherabbit
Axeltherabbit / riak_install_WSL.txt
Last active October 7, 2022 10:32
Riak for WSL with systemd
# this is for WSL ubuntu 20
# enable systemd and reboot windows https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/
curl -fsSL https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/erlang.gpg
echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/erlang-solution.list
sudo apt update
sudo apt upgrade
sudo apt-get install build-essential libc6-dev-i386 git cmake make ubuntu-dev-tools erlang curl software-properties-common apt-transport-https lsb-release libpam0g-dev debhelper