Skip to content

Instantly share code, notes, and snippets.

View septor's full-sized avatar
👾

Patrick Weaver septor

👾
View GitHub Profile
@septor
septor / theme.css
Created January 18, 2025 17:01 — forked from pfrazee/theme.css
Simple Wiki Theme
body {
--light-gray: #f7f7fc;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
margin: 0;
display: grid;
grid-gap: 10px;
grid-template-columns: 300px 1fr;
grid-template-rows: 100px 1fr;
min-height: 100vh;
@septor
septor / generator.js
Last active August 16, 2024 19:38
Cherrytree Vault Code Generator
const fs = require('fs');
const digits = "45689".split("");
const length = 7;
function generateCombinations(digits, length, filePath) {
const combinations = [];
const recursiveGenerate = (prefix, remainingLength, usedDigits) => {
if (remainingLength === 0) {
if (usedDigits.size === digits.length) {
<?php
function checkHints($code, $hints) {
$specificPatterns = [
'two_doubles' => '/(\d)\1.*(\d)\2/',
'three_doubles' => '/(\d)\1.*(\d)\2.*(\d)\3/',
'one_triple' => '/(\d)\1\1/',
];
@septor
septor / destinations.dart
Created December 10, 2022 14:21
Ticket To Ride Destinations
// Destination cards for Ticket To Ride.
// This is a snippet from a Flutter app I'm throwing together for scoring.
// This includes the US version as well as the Nordic version.
// This will be expanded as my collection of the versions increases.
class Destination {
String from;
String to;
int score;
@septor
septor / admin_config.php
Created January 11, 2014 23:52
another attempt at a solution for issue #15 that works for e107 v1.0.4
<?php
/*
+---------------------------------------------------------------+
| e107 website system
| survey_config.php
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
+---------------------------------------------------------------+
*/
@septor
septor / download.php
Created January 7, 2014 14:24
Force download MP3
<?php
$file = ""; // file to download, you could use $_GET['file'] and include it in the URL somehow
header ("Content-type: octet/stream");
header ("Content-disposition: attachment; filename=".$file.";");
header ("Content-Length: ".filesize($file));
readfile($file);
exit;
?>
@septor
septor / survey.php
Created December 29, 2013 15:45
possible solution for issue #15 that works for e107 v1.0.4
<?php
/*
+---------------------------------------------------------------+
| e107 website system
| survey.php
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
+---------------------------------------------------------------+
*/
@septor
septor / pm.php
Created September 7, 2013 21:35
Remove unread PMs older than a year, and remove all PMs older than 5 years **THIS IS UNTESTED**
<?php
// drop this in your root e107 directory
include("class2.php");
// unread in the last 12 months
$sql->db_Delete("private_msg", "pm_sent < ".(time() - 31556926)." AND pm_read = 0") or die(mysql_error());
// older than 5 years
$sql->db_Delete("private_msg", "pm_sent < ".(time() - 157784630)) or die(mysql_error());
@septor
septor / tvrage.php
Last active December 16, 2015 00:49
Logically parse TVRage's "shows on tonight" RSS feed. Allows you to define a list of shows to be displayed. Display format is as follows: TIME SHOWNAME EPISODE -- 10:00PM Elementary (03x19)
<?php
// Display a list of configurable shows that is on today.
$showList = array
(
'Supernatural',
'Person of Interest',
'Elementary',
'The Five'