This file contains 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 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 | |
/** | |
* @param string $url The URL to fetch | |
* @param boolean $json if true, returns decoded json array | |
* @param boolean $show_error if true, prints curl error to screen | |
* @author CodeBrauer <https://github.com/CodeBrauer> | |
* @return string result of fetched url, false on failure | |
*/ | |
function curl_get_contents($url, $json = false, $show_error = false) { | |
if (!function_exists('curl_init')) { return file_get_contents($url); } // fallback |
This file contains 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 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 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 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 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' |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<headhunt> | |
<game name="World of Warcraft" stub="wow"> | |
<victim name="Death Knight" color="c41f3b" image="deathknight.jpg"> | |
<sub name="Blood" /> | |
<sub name="2H Frost" /> | |
<sub name="DW Frost" /> | |
<sub name="Unholy" /> |
This file contains 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 | |
// Configuration ---------------------- // | |
$repo = "e107inc/e107"; | |
$branch = "master"; | |
// ------------------------------------ // | |
$git = simplexml_load_file("https://github.com/".$repo."/commits/".$branch.".atom"); |
NewerOlder