// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
'first_name' => 'Fresher',
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
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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 | |
apt-get install mc htop git unzip wget curl -y | |
echo | |
echo "=====================================================" | |
echo " WELCOME" | |
echo "=====================================================" | |
echo | |
echo "Hub" |
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
// Needed in AndroidManifest: | |
<!-- Permission for using NFC hardware --> | |
<uses-permission android:name="android.permission.NFC"/> | |
<!-- Forcing device to have NFC hardware --> | |
<uses-feature android:name="android.hardware.nfc" android:required="true"/> | |
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent --> | |
<intent-filter> | |
<action android:name="android.nfc.action.TAG_DISCOVERED"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
</intent-filter> |
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 | |
/** | |
* Send a Message to a Slack Channel. | |
* | |
* In order to get the API Token visit: https://api.slack.com/custom-integrations/legacy-tokens | |
* The token will look something like this `xoxo-2100000415-0000000000-0000000000-ab1ab1`. | |
* | |
* @param string $message The message to post into a channel. | |
* @param string $channel The name of the channel prefixed with #, example #foobar |
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 | |
/** | |
* Send a Message to a Slack Channel. | |
* | |
* In order to get the API Token visit: https://api.slack.com/custom-integrations/legacy-tokens | |
* The token will look something like this `xoxo-2100000415-0000000000-0000000000-ab1ab1`. | |
* | |
* @param string $message The message to post into a channel. | |
* @param string $channel The name of the channel prefixed with #, example #foobar |
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
/**************************************************************| CONVERT VARIANT TO SWATCHES |*/ | |
$(function() { | |
if($(".single-option-selector").length) { | |
$(".single-option-selector").each(function(i) { | |
var $thisSelect = $(this); | |
var $newClass = "js-option-selector-" + i; | |
var $newOptions = '<ul class="new-variant-swatchs">'; | |
var $currentOption = $thisSelect.val(); |
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 template contains 'collection' and collection.all_tags.size > 1 %} | |
<!-- A recursive loop to catch and filter out the different tag categories --> | |
{% assign c = 0 %} | |
{% for t in collection.all_tags %} | |
{% capture cat %}{{ cat }}{% capture temp_cat %}{% if t contains '_' %}{% assign cat_grp = t | split: '_' %}{{ cat_grp.first }}{% endif %}{% endcapture %}{% unless cat contains temp_cat %}{% if t contains '_' %}{% assign new_cat_grp = t | split: '_' %}{{ new_cat_grp.first }}{% endif %}{% unless forloop.last %}+{% endunless %}{% assign c = c | plus: 1 %}{% endunless %}{% endcapture %} | |
{% endfor %} | |
<!-- create array of tag categories --> | |
{% assign cat_array = cat | split: '+' %} |
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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
OlderNewer