Skip to content

Instantly share code, notes, and snippets.

View JesseAldridge's full-sized avatar
👻
test status

Jesse Aldridge JesseAldridge

👻
test status
View GitHub Profile
@pch
pch / mac-vagrant-unison.md
Last active February 18, 2019 08:57
How to install Unison on Mac OS El Capitan & Vagrant

How to install Unison on Mac OS El Capitan & Vagrant - for Docker Sync

You can install Unison on the Mac via homebrew (brew install unison), but it's very likely that it won't work properly, resulting in errors like:

Unison failed: Uncaught exception Failure("input_value: bad bigarray kind")
Fatal error: Lost connection with the server
@mikaelz
mikaelz / delete-all-woocommerce-products.php
Last active March 15, 2024 12:53
Remove all WooCommerce products from database via SQL
<?php
require dirname(__FILE__).'/wp-blog-header.php';
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')");
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'");
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)");
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')");
@Treer
Treer / gist:c7d7e33289b725dfb9d07718f6153a9d
Created December 11, 2016 13:18
Find most active fork of a github project
http://forked.yannick.io/
# See official docs at https://dash.plotly.com
# pip install dash pandas
from dash import Dash, dcc, html, Input, Output
import plotly.express as px
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv')
@codediodeio
codediodeio / database.rules.json
Last active January 28, 2024 19:07
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@devinsays
devinsays / customer-new-account.php
Created October 3, 2017 20:36
Sends new WooCommerce customers an account email that with their email address as a login rather than a username.
<?php
/**
* Customer new account email
*
* This template has been overriden to change account creation text.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 1.6.4
@EdenK
EdenK / elementor-video-youtube-enablejsapi.php
Last active March 14, 2024 13:37
Filter to add enablejsapi to Elementor youtube video
<?php
/**
* Filter to add enablejsapi to Elementor youtube video
*/
function add_youtube_jsapi($iframe_html, $video_url, $frame_attributes) {
if(strpos($video_url, 'youtube') !== false) {
$src = esc_attr($frame_attributes['src']);
$new_src = esc_attr(add_query_arg(array('enablejsapi' => '1'), $frame_attributes['src']));
$iframe_html = str_replace($src, $new_src, $iframe_html);
}
@harperreed
harperreed / emfitqs-local-api.md
Created February 17, 2018 20:08
EMFIT QS Sleep tracker location API

EMFIT Local API

There is a functional http server running on the device that can be crawled for realtime data. It runs on port 80 and uses plain http.

You will need to know the IP address if your emfit device.

shortdvm.htm

For demoing / testing with a web browser there is an auto-refreshing page that contains only HR and RR values, it’s name is shortdvm.htm

@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',