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
''' | |
author: Pure Python | |
url: https://www.purepython.org | |
copyright: CC BY-NC 4.0 | |
creation date: 01-12-2018 | |
Script to resize images to one or multiple sizes | |
You need 3 folders for this script | |
/done_images/ |
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
''' | |
author: Pure Python | |
url: https://www.purepython.org | |
copyright: CC BY-NC 4.0 | |
creation date: 11-12-2018 | |
This script uses the "md_data" folder to save the files in to | |
Make sure this folder exists where your run this script | |
Fake images by : https://imgplaceholder.com/ |
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 requests | |
from bs4 import BeautifulSoup | |
import re | |
from lxml import html | |
from urllib.parse import urlsplit | |
import csv | |
class getAddress: | |
def __init__(self, url=None, filename="contacts.cvs"): | |
if url is not 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
import json | |
import requests | |
import csv | |
import datetime | |
class WooCommerceCVS: | |
def __init__(self): | |
self.woo_sfields = ['title', 'sku', 'price', 'description'] |
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 -H pip install xlrd | |
# pip install beautifulsoup4 | |
# maybe you should install the above python items | |
import time | |
import logging | |
import os | |
import urllib | |
import sys |
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 #if copy past to function, remove this line | |
/** | |
* Adds 'Profit' column header to 'Orders' page immediately after 'Total' column. | |
* | |
* @param string[] $columns | |
* @return string[] $new_columns | |
*/ | |
function tvdsluijs_add_order_invoice_column_header( $columns ) { |
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
{% if paginator.total_pages > 1 %} | |
<div class="pagination"> | |
{% if paginator.previous_page %} | |
<a class="ml-1 mr-2" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« {{site.str_previous_page}}</a> | |
{% else %} | |
<span>« {{site.str_previous_page}}</span> | |
{% endif %} | |
{% assign page_start = paginator.page | minus: site.pagination_nr %} | |
{% assign page_end = paginator.page | plus: site.pagination_nr %} |
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 this to your _config.yml | |
months: | |
- Januari | |
- Februari | |
- Maart | |
- April | |
- Mei | |
- Juni | |
- July |
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
function showPostsOtherSite($atts) { | |
//this information is found in the config.php of your other wordpress blog | |
$db_username = 'XXXXXXXXXX'; | |
$db_password = 'XXXXXXXXXX'; | |
$db_database = 'XXXXXXXXXX'; | |
$db_host = 'localhost'; //leave localhost or type IP from different server! | |
$db_prefix = 'XX_'; //something like wp_ (don't forget the _ sign) | |
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
#!/bin/bash | |
#add right params at [PARAM] | |
export LC_ALL=C | |
BAK="/opt/backup" | |
TIMESTAMP=`date +%F-%H%M` | |
S3_BUCKET_NAME=[BUCKET_NAME] | |
S3_BUCKET_PATH=[BUCKET_PATH] |