Skip to content

Instantly share code, notes, and snippets.

# Based off of https://github.com/felixrieseberg/windows-development-environment/blob/master/boxstarter
# Configure Windows
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory $directory | Out-Null
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"math"
"math/cmplx"
"os"
from fastapi import Security, Depends, FastAPI, HTTPException
from fastapi.security.api_key import APIKeyQuery, APIKeyCookie, APIKeyHeader, APIKey
from starlette.status import HTTP_403_FORBIDDEN
API_KEY_NAME = "access_token"
api_key_query = APIKeyQuery(name=API_KEY_NAME, auto_error=False)
api_key_header = APIKeyHeader(name=API_KEY_NAME, auto_error=False)
api_key_cookie = APIKeyCookie(name=API_KEY_NAME, auto_error=False)
@makupi
makupi / database;config.js
Last active May 23, 2020 12:35
sequelize example (; = / since gists don't allow that apparently)
module.exports = {
development: {
dialect: "sqlite",
storage: "./db.development.sqlite"
},
test: {
dialect: "sqlite",
storage: ":memory:"
},
production: {
@makupi
makupi / music_bot_example.py
Created May 17, 2020 23:21 — 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.
@makupi
makupi / test.md
Last active May 13, 2020 22:57
markdown headings
  1. section one
  2. section two

Section One

Bacon ipsum dolor amet venison bresaola shank, burgdoggen swine rump t-bone sirloin. Picanha tail pork burgdoggen ham rump shank pork chop frankfurter shoulder tongue ball tip buffalo. Tail pork chop strip steak cow pork pancetta fatback, ball tip short ribs. Meatloaf chicken pork belly hamburger pig, buffalo doner tongue.

Brisket short ribs pancetta rump, pork shankle shank tri-tip chislic drumstick. Meatball kevin fatback strip steak venison bresaola sirloin frankfurter. Porchetta sausage chicken capicola. Ball tip pig corned beef, jowl tongue prosciutto shank brisket turducken beef t-bone. Bresaola pork belly landjaeger, biltong picanha tail brisket shankle venison pig short loin.

Short ribs t-bone filet mignon, chicken turkey beef ribs alcatra buffalo leberkas turducken shoulder rump jowl landjaeger. Short ribs shankle rump cow biltong. Burgdoggen pancetta ribeye fatback ground round sausage turducken capicola corned beef chuck

@makupi
makupi / gino.py
Last active May 9, 2020 17:22
GINO tips and notes
# LIKE query
items = await Model.query.where(Model.name.like(f'%{name}%')).gino.all()
# AND query, can be achieved through chaining .where()
items = await Model.query.where(Model.guild_id == guild_id).where(Model.name==name).gino.all()
@makupi
makupi / ReactionRoles discord.py
Last active January 25, 2023 20:52
reaction role cog for discord.py
import discord
from discord.ext import commands
import json
import atexit
import uuid
reaction_roles_data = {}
try: