Skip to content

Instantly share code, notes, and snippets.

View gaycookie's full-sized avatar
🌈

GayCookie ✌ gaycookie

🌈
View GitHub Profile
@gaycookie
gaycookie / index.php
Created October 10, 2018 16:48
example-oauth2-php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if (isset($_GET["error"])) {
echo json_encode(array("message" => "Authorization Error"));
} elseif (isset($_GET["code"])) {
Header("Location: login.php?code={$_GET["code"]}");
@gaycookie
gaycookie / main.py
Created April 13, 2020 21:39
String comparing!
from re import sub
class Main:
def __init__(self):
self.input = ''
self.expected = []
self.percentage = 75
self.points = 0
def compare(self, context='', expected=[], percentage=75):
@gaycookie
gaycookie / config.py
Last active April 14, 2020 12:53
YAML ConfigParser
from yaml import safe_load, YAMLError
class ConfigParser:
def __init__(self, file_name):
self.config = self.__load(file_name)
def __load(self, file_name=''):
if len(file_name) == 0:
file_name = 'config.yaml'
@gaycookie
gaycookie / DiscordWebhook.java
Created May 5, 2020 22:05 — forked from k3kdude/DiscordWebhook.java
Java DiscordWebhook class to easily execute Discord Webhooks
import javax.net.ssl.HttpsURLConnection;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gaycookie
gaycookie / identity.json5
Last active February 14, 2021 15:37
Identity settings that works best with Creepings Origin.
{
// Whether an overlay message appears above the hotbar when a new identity is unlocked.
"overlayIdentityUnlocks": false,
// Whether an overlay message appears above the hotbar when a new identity is revoked.
"overlayIdentityRevokes": false,
// Whether a player's equipped identity is revoked on death.
"revokeIdentityOnDeath": false,
// Whether identities equip the items (swords, items, tools) held by the underlying player.
"identitiesEquipItems": true,
// Whether identities equip the armor (chestplate, leggings, elytra) worn by the underlying player.
@gaycookie
gaycookie / WallpaperDownloader.py
Last active May 15, 2021 10:50
Konachan wallpaper downloader and automaticly sets it as your wallpaper!
import requests
import shutil
import os
folder = ".wallpapers"
tags = ["catgirl", "order:random", "width:1920", "height:1080", "rating:questionableless"]
url = "https://konachan.net/post.json?limit=1&tags=" + "+".join(tags)
workingDir = os.getcwd()
downloadDir = os.path.join(workingDir, folder)
@gaycookie
gaycookie / api.py
Last active June 20, 2021 15:13
Something random
import json
from flask import Flask, request
from random import randrange
app = Flask(__name__)
def roll(type, rolls):
total = 0
for i in range(rolls):
@gaycookie
gaycookie / main.py
Last active October 15, 2021 15:16
YouTube Downloader, something like this happens when you're out of idea's.
import youtube_dl, json, os, argparse
from pathlib import Path
class Config:
def __init__(self):
self.location = str(Path.joinpath(Path.home(), "Downloads"))
self.format = "mp3"
@staticmethod
def check_config():

Keybase proof

I hereby claim:

  • I am gaycookie on github.
  • I am gaycookie (https://keybase.io/gaycookie) on keybase.
  • I have a public key ASBRI4GimHr939dxgUaOL2rtOu5FVE24HBIkhycS_NpHRwo

To claim this, I am signing this object: