Skip to content

Instantly share code, notes, and snippets.

View Torbikini's full-sized avatar
💬
Message on Discord.

Torbjörn Lindholm Torbikini

💬
Message on Discord.
View GitHub Profile
@Torbikini
Torbikini / mcexport.py
Created December 27, 2022 04:14 — forked from alexiscoutinho/mcexport.py
Convert MineCraft JSON model to Source engine model
import collections
import io
import json
import logging
import logging.handlers
import math
import os
import shutil
import struct
import subprocess
name: ${project.name}
version: ${project.version}
#Might need to change this depending on your package structure, but it's standard not to.
main: ${project.groupId}.${project.artifactId}
@Torbikini
Torbikini / index.html
Created January 14, 2020 21:24
Rank Card
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Poppins" rel="stylesheet">
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="467px" height="141px">
<!-- Background picture -->
<rect id="rect" width="100%" height="100%" rx="3" ry="3" style="fill:#2196F3;"></rect>
@Torbikini
Torbikini / index.php
Created March 27, 2019 19:40
example-oauth2-php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if (isset($_GET["error"])) {
echo json_encode(array("message" => "Authorization Error"));
} elseif (isset($_GET["code"])) {
Header("Location: login.php?code={$_GET["code"]}");
@Torbikini
Torbikini / index.php
Created March 27, 2019 19:38 — forked from Jengas/index.php
Discord oauth2 example PHP
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('max_execution_time', 300); //300 seconds = 5 minutes. In case if your CURL is slow and is loading too much (Can be IPv6 problem)
error_reporting(E_ALL);
define('OAUTH2_CLIENT_ID', '1234567890');
define('OAUTH2_CLIENT_SECRET', 'verysecretclientcode');