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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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
/** | |
* Call external API | |
* @param string $endPoint | |
* @param array $data | |
* @param array $headers | |
* @return OBJECT | |
*/ | |
function callApi($data,$headers,$endPoint='wp-json/wc/v2/orders',$method='POST'){ | |
return wp_remote_post( home_url($endPoint), array( |
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 (is_cart()) { ?> | |
<script type="text/javascript"> | |
// Each time quantity in the cart changes, trigger update | |
// cart option | |
jQuery('div.woocommerce').on('change', '.qty', function(){ | |
// Make sure the button is enabled before triggering the event | |
// otherwise this won't work. | |
jQuery("[name='update_cart']").prop("disabled", false); | |
jQuery("[name='update_cart']").trigger("click"); | |
}); |
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 | |
/** | |
* SET URL BASED ON THE CURRENT URL | |
*/ | |
define('WP_SITEURL', $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST']); | |
define('WP_HOME', $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST']); | |
/** OTHER WORDPRESS CONFIGURATIONS **/ |
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
// from: http://stackoverflow.com/questions/2226920/how-to-monitor-clipboard-content-changes-in-c | |
/// <summary> | |
/// Provides notifications when the contents of the clipboard is updated. | |
/// </summary> | |
public sealed class ClipboardNotification | |
{ | |
/// <summary> | |
/// Occurs when the contents of the clipboard is updated. | |
/// </summary> |
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 | |
/** | |
* Convert CSV TO ARRAY | |
* @param string $filename | |
* @param string $delimiter | |
* @return | |
*/ | |
function csvToArray($filename='', $delimiter=','){ | |
if(!file_exists($filename) || !is_readable($filename)) | |
return 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
.ui-sortable-container { | |
overflow: auto; | |
-ms-overflow-x: hidden; | |
overflow-x: hidden; | |
} | |
.ui-sortable { | |
margin: 0; | |
list-style: 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
$(function(){ | |
$('.form-horizontal').on('click', function(e){ | |
e.preventDefault(); | |
var $form = $('.form-horizontal'); | |
var url = $form.attr('action'); | |
var method = $form.attr('method'); | |
$.ajax({ | |
url: url, | |
type: method, | |
data: $form.serialize(), |
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 | |
/************************************************ | |
* Round Robin Pairing Generator | |
* Author: Eugene Wee | |
* Date: 23 May 2005 | |
* Last updated: 23 May 2005 | |
* Copyright (c) 2005 Eugene Wee | |
* Licensed under the Academic Free License 2.1 | |
* Based on algorithm by Tibor Simko | |
************************************************/ |