This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/', | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
+---------------------------------------------------------------+ | |
| e107 website system | |
| survey_config.php | |
| | |
| Released under the terms and conditions of the | |
| GNU General Public License (http://gnu.org). | |
+---------------------------------------------------------------+ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
+---------------------------------------------------------------+ | |
| e107 website system | |
| survey.php | |
| | |
| Released under the terms and conditions of the | |
| GNU General Public License (http://gnu.org). | |
+---------------------------------------------------------------+ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Display a list of configurable shows that is on today. | |
$showList = array | |
( | |
'Supernatural', | |
'Person of Interest', | |
'Elementary', | |
'The Five' |
NewerOlder