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
require 'net/ftp' | |
def scan(ftp, dir) | |
ftp.chdir(dir) | |
puts ftp.pwd + "/." | |
entries = ftp.list('*') | |
entries.each do |entry| | |
if entry.split(/\s+/)[0][0,1] == "d" then | |
scan(ftp, entry.split.last) | |
else |
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
<VirtualHost *:80> | |
ServerName es.yourhost.com | |
<Proxy balancer://main> | |
BalancerMember http://127.0.0.1:9200 max=1 retry=5 | |
<Limit GET > | |
order deny,allow | |
deny from all | |
allow from 127.0.0.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
<!-- The tags here are standard inline GPT tags --> | |
<!-- This is for the HTML <head> section --> | |
<!-- | |
This calls aysnc GPT. This is the most user-friendly tagging option and decreases load time | |
If it isn't possible to include this in the HEAD section then drop it in above each of the | |
inline tags in the same code block. | |
--> | |
<head> |
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 | |
/** | |
* @author Ian Lewis <ianlewis (at) electricowl.co.uk | |
* Chartbeat code - generic | |
* We will only use when it is single (article) page | |
* | |
* Some of the code is lifted from the Chartbeat WP plugin. Next step would be to | |
* make this into a lightweight plugin otherwise drop into functions.php inside your theme | |
* Ensure that you set chartbeat_account_id (below) to your own account!!! | |
*/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>PurelyFootball unified JS adslots</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> |
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 | |
/** | |
* Logging functions here. | |
* | |
*/ | |
function get_socket() { | |
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1); | |
return $sock; |
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 | |
// Exclude category "Exclude from all feeds" | |
function excludecatfeed( $query ) | |
{ | |
if( is_feed() ) | |
{ | |
$query->set( 'cat', '-5618' ); | |
return $query; | |
} |
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 | |
define('MAX_ENTRIES_PER_MAP', 5000); | |
// chunk the data | |
$chunks = array(); | |
$chunk_data = array(); | |
$chunk_count = 0; | |
while ($replay = $replays->fetch_array(MYSQLI_ASSOC)) { | |
if (0 == ($sitemap_counter % MAX_ENTRIES_PER_MAP)) { |
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
server { | |
server_name grafana.*; | |
root /usr/share/grafana; | |
access_log /var/log/nginx/grafana-access.log timed_combined; | |
access_log /var/log/nginx/grafana-json.event.access.log json_event; | |
error_log /var/log/nginx/grafana-error.log; | |
location =/config.js { | |
alias /etc/grafana/config.js; |
NewerOlder