Skip to content

Instantly share code, notes, and snippets.

View tjrgg's full-sized avatar
🤖
Working on something

Tyler Richards tjrgg

🤖
Working on something
View GitHub Profile
@vladfrangu
vladfrangu / chain_of_events.md
Last active August 31, 2020 11:04
What happened in Dirigeants, and where are we going next

This is a long story, with a lot of events that ended up creating the current state of Dirigeants: silent, dead, and unable to be maintained all due to AoDude (known as bdistin on GitHub) being power hungry, and not to mention selfish.

Around July 23rd, it all started when AoDude kicked Kyra for pinging him that his bot went offline. Thus, Kyra lost his Developer (and Admin) role, the former being given back once Kyra rejoined, however a reason behind the kick was never actually given. Around that day, we started drafting a formal letter, informing AoDude that due to his repeated violations of his own Code of Conduct, he will lose the ownership status on the GitHub organization, and unless he respects the terms mentioned in the letter, he'll lose the membership status as well.

Another one of Ao's actions was to ban Kyra over "breaking copyright", and filing an unofficial DMCA takedown request to Kyra's work-in-progress framework. The issue is publicly available here: https://github.com/sapphire-proj

@levelsio
levelsio / getRandomFollower.php
Created January 11, 2020 10:22
get random Twitter follower from your exported followers.js
<?
// str_replace removes the JS part and makes it into a normal JSON file
$followers=json_decode(str_replace('window.YTD.follower.part0 = ','',file_get_contents(__DIR__.'/followers.js')),true);
echo "\n\n";
echo number_format(count($followers)).' followers';
echo "\n\n";
@bradtraversy
bradtraversy / state_capitals.json
Created April 27, 2019 12:24
JSON array of states and capitals
[
{
"abbr": "AL",
"name": "Alabama",
"capital": "Montgomery",
"lat": "32.361538",
"long": "-86.279118"
},
{
"abbr": "AK",
@levelsio
levelsio / levelsio-by.html
Last active March 10, 2021 05:20
Maker Link (aka the @levelsio by link)
<!-- Maker Link by @levelsio -->
<!-- MIT License -->
<style>
body {
background:#333;
}
.levelsio-by {
font-family:"Helvetica Neue",sans-serif;
right:0;
@liddack
liddack / app.js
Last active November 1, 2020 10:31
Crowdin Source Update String Notifier for Discord Project
// Loading logger module
const log = require('fancy-log')
log.info('Loading...')
// Loading the rest of the modules
const Webhook = require("./webhook"),
express = require('express'),
TurndownService = require('turndown'),
turndownService = new TurndownService(),
events = require('events'),
@levelsio
levelsio / makebook_obfuscate.php
Last active April 20, 2024 01:51
Obfuscate your ebook so that people who didn't pay can read it, partly
<?php
/*
I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it.
It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though.
It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function.
You should check if user paid for book or not, then either run ob_start or not!
/**
Simple(ish) example of discord gateway
This code will get to ready, and then remain connected with heartbeats
see https://discordapi.com/topics/gateway for more info
zlib compression is implemented as it will be required in gateway v7 (so get used to it now)
*/
const WebSocket = require('ws'); // npmjs.org/ws
const zlib = require('zlib-sync'); // npmjs.org/zlib-sync
const erlpack = require('erlpack'); // github.com/discordapp/erlpack
@rpaul-stripe
rpaul-stripe / app.js
Last active July 11, 2020 01:40
Stripe Checkout Node.js Express Example
const keyPublishable = process.env.PUBLISHABLE_KEY;
const keySecret = process.env.SECRET_KEY;
const app = require("express")();
const stripe = require("stripe")(keySecret);
app.set("view engine", "pug");
app.use(require("body-parser").urlencoded({extended: false}));
app.get("/", (req, res) =>
@karlkranich
karlkranich / apitest.php
Last active July 17, 2018 14:49
Updated PHP code to use the Google Sheets API. See usage instructions at http://karl.kranich.org/2015/04/16/google-sheets-api-php/ More examples at https://gist.github.com/karlkranich/afa39e3d778455b38c38
<?php
// apitest.php
// by Karl Kranich - karl.kranich.org
// version 3.1 - edited query section
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php');
include_once "google-api-php-client/examples/templates/base.php";
$client = new Google_Client();
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//