Skip to content

Instantly share code, notes, and snippets.

@chayleaf
chayleaf / any_cast.h
Created April 9, 2017 10:21
boost::any helper
#ifndef ANY_CAST_H
#define ANY_CAST_H
#include "stdc++.h"
#include <boost/any.hpp>
using namespace std;
#define bac boost::any_cast
class cast {
private:
@chayleaf
chayleaf / WebhookTutorial.md
Created April 13, 2018 19:07 — forked from jagrosh/WebhookTutorial.md
Simple Webhook Tutorial (Twitter -> Discord)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel

Step 1 - Register on Zapier

  1. Go to https://zapier.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets
@chayleaf
chayleaf / WebhookTutorial.md
Created April 13, 2018 19:07 — forked from jagrosh/WebhookTutorial.md
Simple Webhook Tutorial (Twitter -> Discord)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel

Step 1 - Register on Zapier

  1. Go to https://zapier.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets
@chayleaf
chayleaf / file.md
Last active April 24, 2025 19:10
cyberchallenge.rt.ru

решения восстановлены по памяти, сами флаги не включены

задание - баллы

Web

No Comments - 240

флаг находится в комментарии к html

Router - 245

@chayleaf
chayleaf / beatmapScaler.py
Created December 16, 2018 09:42
osu! beatmap speed scaler
#change this
path='C:\\Users\\pavlukivan\\AppData\\Local\\osu!\\Songs\\328117 Kurokotei - Galaxy Collapse\\Kurokotei - Galaxy Collapse (Sayaka-) [Oni].osu'
outPath='C:\\Users\\pavlukivan\\AppData\\Local\\osu!\\Songs\\Custom Collapse\\Kurokotei - Galaxy Collapse (Sayaka-) [Oni].osu'
newSpeed = 0.5
class OsuFile:
SECTION_DICT = 0
SECTION_DICT_NO_SPACE = 1
SECTION_TUPLES = 2
SECTION_OBJECTS = 3
@chayleaf
chayleaf / marathons.py
Last active June 14, 2019 14:34
osu! map joiner
#pls report bugs to u/pavlukivan on reddit
#dependencies (install via pip): osu; pydub.
from osu import Beatmap, SampleSet
from osu.events import BackgroundEvent
from pydub import AudioSegment
import random, os
#one file per line
bmFiles = [f for f in '''
/run/media/pavlukivan/7C6CE42C6CE3DF40/osu!/Songs/118 TRF - Survival dAnce _no no cry more_/TRF - Survival dAnce ~no no cry more~ (Echo49) [Insane].osu
@chayleaf
chayleaf / abc.py
Created July 12, 2019 12:13
pattern complexity test
import sys,os
# hardcoded aether ritual patterns
p = ['''
1,d
3,k
5,d
6,k
7,d
11,d
12,d
@chayleaf
chayleaf / abc.py
Created July 12, 2019 12:49
pattern complexity test
import sys,os
# hardcoded aether ritual patterns
p = ['''
1,d
3,k
5,d
6,k
7,d
11,d
12,d
@chayleaf
chayleaf / ip.md
Last active April 16, 2021 15:23
copyright/ip opinion

As a hacker, I love to tinker with stuff. While I love to tinker with tech, I love to tinker with information as well. To put it simply, I'm a hacker and a pirate. Game mods, memes, fan games - are all things I consider strictly beneficial for society, and sadly, they all infringe copyright or at least are discouraged by it. Piracy's effect on society is debatable - it forces the work into an illegal public domain, which can be a good or a bad thing - I'm not as saddened by the fact it infringes copyright, even though I still disagree with the law. For example, I dislike Windows piracy because it still plays for Microsoft's network effect, and some potential Linux users use Windows instead. I absolutely don't consider having pirated IDA wrong - I don't have that kind of disposable income so it had zero effect on Ilfak's pockets, while it gave me a lot of hacking knowledge, saving me time over other (heavily inferior at the time, before Ghidra was a thing) tools I would've potentially used. Perhaps it can be s