Skip to content

Instantly share code, notes, and snippets.

vlc.exe "inputVideo.mp4" --fullscreen --no-mouse-events --loop --no-osd --no-audio
@skive
skive / export_csv.php
Created February 27, 2016 21:27 — forked from apocratus/export_csv.php
Export MySQL to CSV (php script)
<?php
/* vars for export */
// database record to be exported
$db_record = 'XXXXXXXXX';
// optional where query
$where = 'WHERE 1 ORDER BY 1';
// filename for export
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv';
// database variables
server {
listen [port];
server_name [web url];
access_log [access_log_location];
error_log [error_log_location];
root [where_to_serve from];
index index.html index.php;
# If file is an asset, set expires and break
server{
listen [port];
server_name [url] [www.url];
access_log [access_log_location];
error_log [error_log];
root [where_to_serve_from];
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
@skive
skive / gist:a066b4712aed880f3245
Created March 11, 2016 18:00
Script to block MS telemetry using Mikrotik router
/ip firewall address-list add list=MStelemetry address=111.221.29.177
/ip firewall address-list add list=MStelemetry address=111.221.29.253
/ip firewall address-list add list=MStelemetry address=131.253.40.37
/ip firewall address-list add list=MStelemetry address=134.170.30.202
/ip firewall address-list add list=MStelemetry address=134.170.115.60
/ip firewall address-list add list=MStelemetry address=134.170.165.248
/ip firewall address-list add list=MStelemetry address=134.170.165.253
/ip firewall address-list add list=MStelemetry address=134.170.185.70
/ip firewall address-list add list=MStelemetry address=137.116.81.24
/ip firewall address-list add list=MStelemetry address=137.117.235.16
@skive
skive / functions.php
Created May 30, 2019 17:59 — forked from JakePT/functions.php
Filter to stop WordPress replacing spaces with dashes in filenames.
<?php
/**
* A copy of WordPress' sanitize_file_name function that doesn't replace
* spaces with dashes. Use on the sanitize_file_name filter to stop WordPress
* replacing filenames with dashes.
*
* ...Or don't. It's probably a bad idea.
*
* @param string $sanitized_filename The previously sanitized filename.
* @param string $filename The original unsanitized filename.