sudo apt install -y libauthen-ntlm-perl libclass-load-perl libcrypt-ssleay-perl libdata-uniqid-perl libdigest-hmac-perl libdist-checkconflicts-perl libencode-imaputf7-perl libfile-copy-recursive-perl libfile-tail-perl libio-compress-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-tee-perl libmail-imapclient-perl libmodule-scandeps-perl libnet-dbus-perl libnet-ssleay-perl libpar-packer-perl libreadonly-perl libregexp-common-perl libsys-meminfo-perl libterm-readkey-perl libtest-fatal-perl libtest-mock-guard-perl libtest-mockobject-perl libtest-pod-perl libtest-requires-perl libtest-simple-perl libunicode-string-perl liburi-perl libtest-nowarnings-perl libtest-deep-perl libtest-warn-perl make cpanminus && \
cd ~/ && \
git clone https://github.com/imapsync/imapsync.git && \
cd ~/imapsync/ && \
sudo ln -s ~/imapsync/imapsync /usr/bin/imapsync && \
imapsync --testslive
Shopify objects that contain attributes that can be dynamically put on the page. For example, the product object contains an attribute called title that can be used to output the title of a product. | |
The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle. | |
Collections & Products | |
Collection ► | |
all_types ► | |
Returns a list of all the product types for a collection | |
#!/bin/bash -e | |
if [ "$UID" -ne 0 ]; then | |
echo "Please run as root" | |
exit 1 | |
fi | |
# Only run it if we can (ie. on Ubuntu/Debian) | |
if [ -x /usr/bin/apt-get ]; then | |
apt-get update |
Taken from a DigitalOcean tutorial.
Create and enable swapfile:
# create a 2GB file only accessible by root
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
# mark the file as a swap space
The list of actions listed below was taken mostly from Book Of Zeus with minor modifications and did the job well for Ubuntu version, which was available at that moment (May 2016). This gist was created for internal use and was never meant to be discovered by the web, although Google managed to find and index this page, which was a great surprise for me. Please check the original source for the updated information (links are provided in most of the sections), and read the comments below: they provide more details about the usage experience.
http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/
Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.
<IfModulemod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(.*)$ public/$1 [L] | |
</IfModule> |
// get primary category - must have Yoast SEO installed | |
function get_primary_category($post_id){ | |
$term_list = wp_get_post_terms($post_id, 'category', ['fields' => 'all']); | |
foreach($term_list as $term) { | |
if( get_post_meta($post_id, '_yoast_wpseo_primary_category',true) == $term->term_id ) { | |
return $term; | |
} | |
} | |
} |
//This is for bootstrap 4 - given the media queries. Can easily be changed for Bootstrap 3 | |
$xl-down: "max-width: 9999px"; | |
$lg-down: "max-width: 1199px"; | |
$md-down: "max-width: 991px"; | |
$sm-down: "max-width: 767px"; | |
$xs-down: "max-width: 575px"; | |
$xl-up: "min-width: 1200px"; | |
$lg-up: "min-width: 992px"; |
$lg: "min-width: 1200px"; | |
$md: "max-width: 1199px"; | |
$sm: "max-width: 991px"; | |
$xs: "max-width: 767px"; | |
$lg-up: "min-width: 1199px"; | |
$md-up: "min-width: 991px"; | |
$sm-up: "min-width: 767px"; | |
$xs-up: "min-width: 0px"; |
<?php | |
/* ---------------------------------------------------- */ | |
/* 程序名称: PHP探针-Yahei | |
/* 程序功能: 探测系统的Web服务器运行环境 | |
/* 程序开发: Yahei.Net | |
/* 联系方式: [email protected] | |
/* Date: 1970-01-01 / 2012-07-08 | |
/* ---------------------------------------------------- */ | |
/* 使用条款: | |
/* 1.该软件免费使用. |