Skip to content

Instantly share code, notes, and snippets.

View prestonw's full-sized avatar

Will prestonw

View GitHub Profile
@prestonw
prestonw / reclaimWindows10.ps1
Created January 11, 2017 23:06 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@prestonw
prestonw / keybase.md
Created September 22, 2017 17:08
Keybase Proof

Keybase proof

I hereby claim:

  • I am prestonw on github.
  • I am wpreston (https://keybase.io/wpreston) on keybase.
  • I have a public key ASCAgKEtdUWJdijL8UknR_B2pPPU1TfSozLV6I5hTW_lXQo

To claim this, I am signing this object:

@prestonw
prestonw / Pods.php
Created February 1, 2018 17:29
Pods attachments
<?php
if ( get_post_meta( get_the_ID(), 'image_field', false ) ){
$image_array = get_post_meta( get_the_ID(), 'image_field', false );
}
if ( $image_array ) {
echo '<ul>';
foreach ( $image_array as $image ) {
$class = "post-attachment mime-" . sanitize_title( $image->post_mime_type );
$thumbimg = wp_get_attachment_image( $image['ID'], 'thumbnail');
echo '<li class="' . $class . ' data-design-thumbnail">' . $thumbimg . '</li>';
@prestonw
prestonw / slack2html.php
Last active March 29, 2019 18:41 — forked from levelsio/gist:122907e95956602e5c09
slack2html
<?php
//////////////////////
// Slack Export > HTML
//////////////////////
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
@prestonw
prestonw / Contract Killer 3.md
Created April 3, 2019 16:52 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@prestonw
prestonw / Botnet IP Addresses
Last active October 1, 2019 02:43
Botnet created on RunCloud
1.1.181.16
1.1.182.22
1.1.224.163
1.10.140.43
1.10.178.198
1.10.186.114
1.10.186.135
1.10.186.219
1.10.186.228
1.10.186.35
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@prestonw
prestonw / woo-autocomplete.php
Last active July 7, 2020 14:52
Simply create a mu-plugin folder in your wp-content folder and add this woo-autocomplete.php file.
<?php
defined( 'ABSPATH' ) or die( 'Go Away!' );
/**
* Plugin Name: WooCommerce AutoComplete Plugin
* Description: AutoComplete all sales on WooCommerce.
* Author: Will Preston
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
Handlebars is a semantic web template system, started by Yehuda Katz in 2010.
Handlebars.js is a superset of Mustache, and can render Mustache templates in addition to Handlebars templates.
More: http://handlebarsjs.com/
1. Expressions.
1.1 Basic usage.