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
import pandas as pd | |
#csv file name to be read in | |
in_csv = 'filename.csv' | |
#get the number of lines of the csv file to be read | |
number_lines = sum(1 for row in (open(in_csv))) | |
#size of rows of data to write to the csv, | |
#you can change the row size according to your need |
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
RewriteEngine On | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] |
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
--- //wp-content/plugins/woocommerce-dropshipping/inc/class-wc-dropshipping-admin.php 2019-06-11 23:30:10.000000000 -0400 | |
+++ //wp-content/plugins/woocommerce-dropshipping.new/inc/class-wc-dropshipping-admin.php 2019-06-17 09:57:01.000000000 -0400 | |
@@ -221,7 +221,7 @@ | |
foreach ($meta as $key => $val) { | |
if (isset($_POST[$key])) $meta[$key] = $_POST[$key]; | |
} | |
/* update_woocommerce_term_meta is deprecated, use update_term_meta */ | |
- $cterm = update_woocommerce_term_meta( $term_id, 'meta', $meta ); | |
+ $cterm = update_term_meta( $term_id, 'meta', $meta ); | |
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 | |
class WC_Dropshipping_Orders { | |
public function __construct() { | |
$this->init(); | |
} | |
public function init() { | |
// order processing | |
add_filter('wc_dropship_manager_send_order_email_html',array($this,'send_order_email_html')); | |
add_filter('wc_dropship_manager_send_order_attachments',array($this,'send_order_attach_packingslip'),10,3); |
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
//hardcode domain | |
define('WP_HOME','https://yourdomain.com'); | |
define('WP_SITEURL','https://yourdomain.com'); | |
// force ssl admin | |
define( 'FORCE_SSL_ADMIN', true ); | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); |
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
<template> | |
<div v-bind:class="'form-group ' + wrapperClass"> | |
<span class="required-lbl" v-if="required">* </span> | |
<label>{{ label }}</label> | |
<select class="form-control" v-bind:required="required" @change="updateInput($event.target.value)"> | |
<option v-if="placeholder" value="">{{placeholder}}</option> | |
<option v-for="(option,key) in this.options" value="option" v-bind:value="key">{{option}}</option> | |
</select> | |
</div> | |
</template> |
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
<template> | |
<div v-bind:class="'form-group control-group ' + wrapperClass"> | |
<span class="required-lbl pull-left" v-if="required">* </span> | |
<label class="control-label">{{ label }}</label> | |
<div class="controls"> | |
<div v-bind:class="rightAddon || leftAddon?'input-group':''"> | |
<span v-if="rightAddon" class="input-group-addon">{{rightAddon}}</span> | |
<input v-bind:type="type" @input="updateInput($event.target.value)" class="form-control" | |
v-bind:required="required" :value="value" v-bind:placeholder="placeholder"> |
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
sudo apt-get install git && git clone https://github.com/BHEADRICK/NodeJs-Raspberry-Pi && cd NodeJs-Raspberry-Pi && chmod +x Install-Node.sh && sudo ./Install-Node.sh; |
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
.video { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; } | |
.video img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; cursor: pointer; } | |
.video:after { content: ""; position: absolute; display: block; | |
background: url(play-button.png) no-repeat 0 0; | |
top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; } | |
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } | |
/* image poster clicked, player class added using js */ | |
.video.player img { display: none; } | |
.video.player:after { display: none; } |
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
// Add settings link on plugin page | |
function your_plugin_settings_link($links) { | |
$settings_link = '<a href="options-general.php?page=your_plugin.php">Settings</a>'; | |
array_unshift($links, $settings_link); | |
return $links; | |
} | |
$plugin = plugin_basename(__FILE__); | |
add_filter("plugin_action_links_$plugin", 'your_plugin_settings_link' ); |