Skip to content

Instantly share code, notes, and snippets.

@8dcc
8dcc / userscript-function-delay.js
Created April 17, 2022 02:41
Add custom delay to userscript functions.
// ==UserScript==
// @name Delay function
// @namespace Violentmonkey Scripts
// @include *://example.com/*
// @run-at document-start
// @author Null (r4v10l1)
// ==/UserScript==
// --------------------- Settings ---------------------
var MY_DELAY = 500; // ms, delayChecker will wait this
@8dcc
8dcc / docker-cheatsheet.sh
Last active August 26, 2022 17:09
Docker cheatsheet
# Build image
docker build -d image_name .
# Run image in daemon and remove after exit
docker run --name container_name --rm -it -d image_name
# Clear images without tag
docker rmi $(docker images -f "dangling=true" -q)
# Clone an image's tag
@8dcc
8dcc / compile.sh
Last active January 18, 2022 15:00
#!/bin/sh
##############################
# For linux only. Usage:
# ./compile.sh FILE.c [run]
##############################
# Check if sdl2 is installed
if [[ $(command -v sdl2-config) == "" ]]; then
echo "Cant' find sdl2. Exiting..."
@8dcc
8dcc / remove-a-commit.md
Last active November 30, 2021 23:09
How to remove a recent commit.

How to remove a recent commit.

By restoring a recent commit, previous to the ones you want to delete, and then adding the ones you want to recover.

Based on here. Cherry Pick method.

Let's say these are our recent commits:

Number | Hash | Commit Message | Author

@8dcc
8dcc / csgo-autoexec.cfg
Last active November 17, 2023 23:03
My personal csgo/tf2 autoexec
echo
echo "⠀⠀⠀⠀⠀⢀⣴⡾⠿⠿⠿⠿⢶⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
echo "⠀⠀⠀⠀⢠⣿⠁⠀⠀⠀⣀⣀⣀⣈⣻⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀"
echo "⠀⠀⠀⠀⣾⡇⠀⠀⣾⣟⠛⠋⠉⠉⠙⠛⢷⣄⠀⠀⠀⠀⠀⠀⠀"
echo "⢀⣤⣴⣶⣿⠀⠀⢸⣿⣿⣧⠀⠀⠀⠀⢀⣀⢹⡆⠀⠀⠀⠀⠀⠀"
echo "⢸⡏⠀⢸⣿⠀⠀⠀⢿⣿⣿⣷⣶⣶⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀"
echo "⣼⡇⠀⢸⣿⠀⠀⠀⠈⠻⠿⣿⣿⠿⠿⠛⢻⡇⠀⠀⠀⠀⠀⠀⠀"
echo "⣿⡇⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣼⣷⣶⣶⣶⣤⡀⠀⠀"
echo "⣿⡇⠀⢸⣿⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀"
echo "⢻⡇⠀⢸⣿⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿⣿⣿⣿⡇"
@guac42
guac42 / music_bot_example.py
Last active December 2, 2022 22:56 — forked from vbe0201/music_bot_example.py
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.
Requirements:
Python 3.5+
pip install -U discord.py pynacl youtube-dl
// ==UserScript==
// @name Twitch Channel Points autoclaimer
// @version 1.0.0
// @description Automatically clicks the chest to claim the Twitch channel points
// @author jammy
// @match https://twitch.tv/*
// @match https://www.twitch.tv/*
// @grant none
// ==/UserScript==
@scragly
scragly / discord_emoji.md
Last active September 3, 2023 10:07
Emoji for Discord Bots

Discord Emoji

Note: This is written for those using Python 3 and discord.py, so if you're using something else please reference the relevant documentation for your language or library if you choose to use this as a general reference.

On Discord, there are two different emoji types:

Each needs to be handled differently, as while unicode emoji are just simple unicode characters, Discord custom emoji are special objects available only in Discord, belonging to a specific Discord guild and having their own snowflake ID.

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 21, 2024 17:20
Hyperlinks in Terminal Emulators
@Mattze96
Mattze96 / bot.lua
Created March 30, 2015 06:47
telegram-cli lua file api
print ("bot v1.0")
now = os.time()
home_dir = "/home/matthias/"
function send_msg_cb(cb_extra, success, result)
if success then
return
end
end