Skip to content

Instantly share code, notes, and snippets.

@dotja
dotja / drf-api-swagger-doc.md
Last active May 4, 2024 20:22
Django REST Framework API documentation using Swagger

API Documentation with DRF and Swagger

Overview:

  • We need to create a schema. The schema outlines all the endpoints and actions of our API.

  • We need to create the documentation that is a more human-readable form of the schema.

Steps:

@ImagineGamingPlay
ImagineGamingPlay / code.bash
Created December 20, 2021 10:44
Code to put in shell
# Put this code in shell
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
@hakib
hakib / admin.py
Created December 9, 2017 08:37
Django Admin InputFilter
# common/admin.py
class InputFilter(admin.SimpleListFilter):
template = 'admin/input_filter.html'
def lookups(self, request, model_admin):
# Dummy, required to show the filter.
return ((),)
def choices(self, changelist):
@ghost1372
ghost1372 / publish.yml
Last active May 4, 2024 20:12
I use this action to publish project, compress to Zip and upload to GitHub release
name: "Publish"
on:
push:
tags:
- "v*"
env:
PROJECT_PATH: WpfApp6/WpfApp6.csproj
ZIP_PATH: WpfApp6/bin/Release/net5.0-windows/win-x86/publish/WpfApp6-Portable.zip
@ghstbny
ghstbny / media-sort.user.js
Last active May 4, 2024 20:10
Adds the ability to sort medias on bunkr and cyberdrop
// ==UserScript==
// @name media-sort
// @namespace https://github.com/ghstbny
// @match https://bunkr.*/a/*
// @match https://bunkr.ac/a/*
// @match https://bunkr.black/a/*
// @match https://bunkr.cat/a/*
// @match https://bunkr.la/a/*
// @match https://bunkr.media/a/*
// @match https://bunkr.red/a/*
@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up πŸ”‘πŸ”πŸ’»

Updating expired GPG keys and their backup πŸ”‘πŸ”πŸ’»

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
According to all known laws of aviation, there is no way a bee should be able to fly.
Its wings are too small to get its fat little body off the ground.
The bee, of course, flies anyway because bees don't care what humans think is impossible.
Yellow, black. Yellow, black. Yellow, black. Yellow, black.
Ooh, black and yellow!
Let's shake it up a little.
Barry! Breakfast is ready!
Coming!
Hang on a second.
Hello?
@trandaison
trandaison / starUML.md
Last active May 4, 2024 20:11
Get full version of StarUML
@DavidWells
DavidWells / reset.css
Last active May 4, 2024 20:04 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@maximtrp
maximtrp / Orange Pi PC + Arch Linux ARM.md
Last active May 4, 2024 20:03
Guide on how to install Arch Linux ARM on SD card for your Orange Pi PC board

Orange Pi PC + Arch Linux ARM: installation guide

This guide is based on multiple guides as well as official instructions for the other boards found on the Internet:

  1. https://github.com/RoEdAl/alarm-uboot-sunxi-armv7
  2. https://uthings.uniud.it/building-mainline-u-boot-and-linux-kernel-for-orange-pi-boards
  3. https://archlinuxarm.org/platforms/armv7/allwinner/pcduino3

I have gone through all these steps recently and got a working board with my favorite Arch Linux ARM. I hope it will be helpful for someone else.