Skip to content

Instantly share code, notes, and snippets.

@rtkay123
rtkay123 / Smart HTTP Git and CGIT on Nginx server with Auth on push
Last active May 1, 2024 11:57
Installing Git and Cgit to Debian NGINX server (with smart http and authentication on push)
# Just some notes on enabling smart http with nginx as well as authentication on push for repos
# install git, cgit and apache2-utils (for authentication)
apt install git cgit apache2-utils fcgiwrap
# create a git user
adduser git
su git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 1, 2024 11:56
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@Clybius
Clybius / index.html
Last active May 1, 2024 11:56
Embed AV1/No File Size Capped Videos in Discord
<head>
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed.
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1!
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct.
<meta property="og:video:height" content="1080">
</head>
@Myndex
Myndex / colorPalette.js
Last active May 1, 2024 11:55 — forked from rjurney/colorPalette.js
Kelly's 22 Colors of Some Contrast (revised)
// An object of Kelly's 22 colors, converted from rjurney's array
// Color names are camelCase, and 'ish' was removed from all
// The two-name colors have an alternate name as well, such as:
// example: orangeYellow lightOrange manilla is "#e1a11a"
// As for "maximum contrast", I do not endorse that claim
// theory - https://eleanormaclure.files.wordpress.com/2011/03/colour-coding.pdf (page 5)
// kelly's colors - https://i.kinja-img.com/gawker-media/image/upload/1015680494325093012.JPG
// hex values - http://hackerspace.kinja.com/iscc-nbs-number-hex-r-g-b-263-f2f3f4-242-243-244-267-22-1665795040
@file:OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
package de.kuno.listsections
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateRectAsState
import androidx.compose.foundation.ExperimentalFoundationApi
def make_pyramid_half(height, pivot):
half = ''
for i in range(pivot):
if i >= pivot - height:
half = half + '1'
else:
half = half + '0'
return half
#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@MoisesTedeschi
MoisesTedeschi / Lista de comandos do Git
Last active May 1, 2024 11:48
Lista dos principais comandos do Git que vivo esqucendo - Lembrete.
Comandos do git
git commit -m"contaúdo da mensagem de commit": Gravação de arquivo no git. Esse comando serve para commitar os arquivos no git.
O "-m" é referete ao termo "mensseger". Ou seja, mensagem que será gravada no commit.
ctrl + l = É o comando que limpa a tela do terminal do git.
git log: Comando para visualizar os logs dos arquivos gravados no repositório.
git remote add origin + endereço da pasta no github: Esse comando permite apontar para o repositório no github.
@jaames
jaames / playdate-curve.lua
Last active May 1, 2024 11:46
Simple bezier curve drawing functions for the Playdate Lua SDK
-- bezier curve drawing functions for playdate lua
-- these are based on de Casteljau's algorithm
-- this site has a nice interactive demo to compare both types of curve: https://pomax.github.io/bezierinfo/#flattening
-- draws a curve starting at x1,y1, ending at x3,y3, with x2,y2 being a control point that "pulls" the curve towards it
-- steps is the number of line segments to use, lower is better for performance, higher makes your curve look smoother
-- the playdate is kinda slow, so it's recommended to find a relatively low step number that looks passable enough!
function drawQuadraticBezier(x1, y1, x2, y2, x3, y3, steps)
steps = steps or 8
local d = 1 / steps