Skip to content

Instantly share code, notes, and snippets.

View BlackDahlia313's full-sized avatar
🥉
Help Me Help You

Hey... It's ruffiØ! BlackDahlia313

🥉
Help Me Help You
View GitHub Profile
@BlackDahlia313
BlackDahlia313 / directus_kick_sso_config
Created February 23, 2025 19:12
The SSO env variables for Kick and Directus SSO
AUTH_KICK_DRIVER=oauth2
AUTH_KICK_CLIENT_ID=********
AUTH_KICK_CLIENT_SECRET=********
AUTH_KICK_AUTHORIZE_URL=https://id.kick.com/oauth/authorize
AUTH_KICK_ACCESS_URL=https://id.kick.com/oauth/token
AUTH_KICK_PROFILE_URL=https://api.kick.com/public/v1/users
AUTH_KICK_SCOPE=user:read
AUTH_KICK_CLIENT_TOKEN_ENDPOINT_AUTH_METHOD=client_secret_post
AUTH_KICK_ALLOW_PUBLIC_REGISTRATION=true
AUTH_KICK_DEFAULT_ROLE_ID==********
@gschoppe
gschoppe / bad-matt.php
Last active December 6, 2024 06:24
This is a protest plugin in response to the unacceptable behavior of Matt Mullenweg (BDFL of WordPress). In a propaganda interview, Matt claimed that one of the unacceptable things that WPEngine did was to strip out the stripe partner id from woocommerce's stripe gateway plugin. Not only does this appear to be false, but it is in no way a violat…
<?php defined('ABSPATH') or die();
/*
* Plugin Name: Bad Matt
* Plugin URI: https://gschoppe.com
* Description: A protest plugin that removes (or replaces via filter) the Automattic-owned woocommerce stripe gateway partner id.
* Version: 1.0.0
* Requires at least: 4.0
* Requires PHP: 7.2
* Author: Greg Schoppe
* Author URI: https://gschoppe.com/
@selalipop
selalipop / GameState.cs
Last active September 9, 2022 20:29
Using Server-Sent-Events in Unity
using Newtonsoft.Json;
///Use of Newtonsoft.Json is fully optional
namespace Backend
{
[JsonObject]
public struct GameState
{
[JsonProperty("maxPlayers")] public int MaxPlayers;
[JsonProperty("imposterCount")] public int ImposterCount;
@akirattii
akirattii / sse-serverside-example.js
Last active April 26, 2024 11:15
Server-Sent Events nodejs example. This shows how to detect the client disconnection.
var express = require('express');
var app = express();
// response header for sever-sent events
const SSE_RESPONSE_HEADER = {
'Connection': 'keep-alive',
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'X-Accel-Buffering': 'no'
};