This file contains hidden or 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
When dynamically creating a fileupload field with multiple files option enabled | |
you must also run the gform_post_multifile_upload filter on the field for it to work properly | |
https://docs.gravityforms.com/gform_multifile_upload_field/ |
This file contains hidden or 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
foreach ( $product_post_ids as $id ) { | |
| |
$product = wc_get_product( $id ); | |
| |
$product->set_stock_status( 'instock' ); | |
$product->set_manage_stock( 0 ); | |
$product->save(); | |
| |
} |
This file contains hidden or 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 | |
rm -rf images.csv | |
for file in *; do | |
if [[ $file == *.jpg ]] | |
then | |
sharelink=$(dropbox sharelink "$file") | |
sharelink=${sharelink/dl=0/dl=1} ## replace dl=0 with dl=1 in the sharelinks | |
filename=$(basename "$file") |
This file contains hidden or 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 getSimilarColor ( color ) { | |
var base_colors=["660000","990000","cc0000","cc3333","ea4c88","993399","663399","333399","0066cc","0099cc","66cccc","77cc33","669900","336600","666600","999900","cccc33","ffff00","ffcc33","ff9900","ff6600","cc6633","996633","663300","000000","999999","cccccc","ffffff"]; | |
//Convert to RGB, then R, G, B | |
var color_rgb = hex2rgb(color); | |
var color_r = color_rgb.split(',')[0]; | |
var color_g = color_rgb.split(',')[1]; | |
var color_b = color_rgb.split(',')[2]; | |
//Create an emtyp array for the difference betwwen the colors |
This file contains hidden or 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 __construct() { | |
parent::__construct( awsAccessKey, awsSecretKey ); | |
$settings = get_option( 'op5dwnl_settings' ); | |
$this->buckets = ( isset( $settings['buckets'] ) ) ? $settings['buckets'] : false; | |
add_filter( 'acf/load_field/name=amazon_s3_file', array( $this, 'acf_load_field' ) ); | |
} |
This file contains hidden or 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
#!/usr/bin/env bash | |
# update / upgrade | |
sudo apt-get update > /dev/null 2>&1 | |
sudo apt-get -y upgrade > /dev/null 2>&1 | |
# Install Apache and PHP | |
sudo apt-get install -y apache2 php5 php5-curl > /dev/null 2>&1 | |
# install mysql and give password to installer |
This file contains hidden or 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 | |
$storeids = array(); | |
foreach( $store_merchants as $merchantID ){ | |
$storeid = get_user_meta( $merchantID, 'kostnadsstalle', true ); | |
$storeids[$storeid] = $merchantID; | |
} | |
asort( $storeids ); | |
$lastid = end( $storeids ); | |
if ( 1 < count( $store_merchants ) ) { |
This file contains hidden or 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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^local.site\.com$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://production.site.com/wp-content/uploads/$1 [NC,L] |
This file contains hidden or 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/sh | |
# Arc GTK theme | |
wget http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_15.10/Release.key && sudo apt-key add - < Release.key && | |
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_15.10/ /' >> /etc/apt/sources.list.d/arc-theme.list" | |
# Grub Customizer | |
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer | |
# Nemo without Cinnamon dependencies |
This file contains hidden or 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
NewerOlder