Skip to content

Instantly share code, notes, and snippets.

@vbe0201
vbe0201 / music_bot_example.py
Last active April 10, 2024 13:42
A simple music bot written using discord.py rewrite and youtube_dl.
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Valentin B.
A simple music bot written in discord.py using youtube-dl.
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly.
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know.
@vbe0201
vbe0201 / calculator_python.py
Last active December 12, 2023 21:04
A shit calculator written in Python.
"""
Ein Taschenrechner in Python, welcher wichtige Grundlagen dieser Sprache praktisch angewandt aufzeigen soll.
(c) Vale 2018
https://twitch.tv/itsvaleee
Entstanden in einem Python-Tutorial für Neueinsteiger in diese Sprache.
"""
# Wir erstellen eine Klasse Calculator, in welcher alles anhand von 2 Zahlen ausgerechnet wird.
@vbe0201
vbe0201 / raspberry_python.sh
Last active December 1, 2023 01:57
A shell script for installing Python 3.7.3 on your Raspberry Pi.
#!/bin/bash
# A bash script for installing Python 3.7.3 on your Raspberry Pi.
# (c) 2018 Valentin B.
#
# Open your terminal and type the following command:
# sudo wget https://gist.githubusercontent.com/itsVale/5619215a46d363ece9fc7cdfdfa301c8/raw/raspberry_python.sh && chmod +x raspberry_python.sh && ./raspberry_python.sh
sudo apt-get update -y
sudo apt-get upgrade
@vbe0201
vbe0201 / AlefCrypto.cs
Created July 16, 2019 18:59
Implementation of the Blowfish algorithm in C#
using System;
using System.Text;
namespace AlefCrypto
{
/// <summary>
/// Table that holds subkey arrays for the Blowfish implementation.
/// </summary>
static class BlowfishTable
{
@vbe0201
vbe0201 / get-python.sh
Last active August 16, 2023 19:56
A script to install Python 3.7.2 on your Debian, Ubuntu or Mint server.
#!/bin/bash
#
# A bash script for installing Python 3.7.2 on your Debian, Ubuntu or Mint server.
# (c) 2019 Valentin B.
#
# Open your terminal and enter the following command:
# wget https://gist.github.com/vbe0201/b85ec47bc198d1c8471acbf016922005/raw/get-python.sh && chmod +x get-python.sh && ./get-python.sh
apt update -y
apt upgrade
const std = @import("std");
const assert = std.debug.assert;
const cache_line = std.atomic.cache_line;
const AtomicUsize = std.atomic.Atomic(usize);
const Ordering = std.atomic.Ordering;
const Allocator = std.mem.Allocator;
// A modified version of Dmitry Vyukov's bounded MPMC queue,
// adapted for single-consumer usage:
@vbe0201
vbe0201 / day01.cpp
Last active December 3, 2021 19:11
My Advent of Code 2021 solutions written in C++
#include <algorithm>
#include <fstream>
#include <iostream>
#include <ranges>
#include <string>
void part1() {
std::ifstream input{"input.txt"};
auto view = std::ranges::istream_view<int>(input);
@vbe0201
vbe0201 / MakePattern.py
Last active November 4, 2021 22:45
Ghidra script that finds unique signature patterns for selected functions
# Finds unique signature patterns for selected functions
# @author Valentin B.
# @category Binary
from itertools import chain
from ghidra.program.model.lang import OperandType
def getSelectedFunction():
@vbe0201
vbe0201 / ackermann.py
Created October 12, 2018 16:08
An implementation of the Ackermann function in Python.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import time
class Ackermann:
def __init__(self):
self.count = 0
@vbe0201
vbe0201 / baby-cpp.cpp
Last active November 16, 2020 10:01
baby-cpp reimplementation - decompetition.io
/* decompetition.io tiny-cpp reimplementation */
#include <iostream>
#include <string>
#include <vector>
/* Function prototypes */
bool check(const std::string& hand, const std::string& word);
int score(const std::string& word);