Skip to content

Instantly share code, notes, and snippets.

View uabaluua's full-sized avatar

Yehorov Dmytro uabaluua

View GitHub Profile
let lastPasswordResetDate, daysFromLastPasswordResetDate;
lastPasswordResetDate = account.lastPasswordResetDate ? account.lastPasswordResetDate : account.added;
daysFromLastPasswordResetDate = moment.duration(moment().diff(moment(lastPasswordResetDate))).asDays();
docker rmi $(docker images -a -q)
docker rm $(docker ps -a -f status=exited -q)
docker volume rm $(docker volume ls -f dangling=true -q)
@uabaluua
uabaluua / setEnv.sh
Created May 23, 2017 11:08
Shell script set env vars
while read LINE; do
[ -z "$LINE" ] && continue
CONST=$(echo $LINE| cut -d'#' -f 1)
[ -z "$CONST" ] && continue
VAR=$(echo $CONST| cut -d'=' -f 1)
VALUE=$(echo $CONST| cut -d'=' -f 2)
echo "export $VAR=\"$VALUE\"" >> /etc/environment
done < .env
@uabaluua
uabaluua / gist:8c41b249d0e10d6a55057698c20ec0d7
Created March 23, 2017 02:38
get_template_directory_uri() returns http instead of https on SSL site
//wp-config
define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
{ $_SERVER['HTTPS']='on'; }
@uabaluua
uabaluua / MM
Created January 13, 2017 15:16
{"searchResult":{"status":{"statusDetail":null,"isSuccess":true},"totalRecords":1,"pageSize":10,"totalPages":1,"pageIndex":1,"searchId":"WEBSERVICES_4382699_0113201717381254151980308027_676137a3c21","recordList":{"record":[{"createdDate":"2016-09-28T11:05:02.000-07:00","lastModifiedDate":"2016-11-12T11:06:13.000-08:00","salesDescription":null,"includeChildren":null,"incomeAccount":{"internalId":"173","externalId":null,"type":null,"name":"2601 Deferred Revenue, Net : Deferred spencer Revenue"},"isTaxable":null,"matrixType":null,"taxSchedule":{"internalId":"1","externalId":null,"type":null,"name":"S1"},"shippingCost":null,"shippingCostUnits":null,"handlingCost":null,"handlingCostUnits":null,"costEstimateType":"_itemDefinedCost","costEstimate":23,"weight":null,"weightUnit":null,"weightUnits":null,"costEstimateUnits":null,"unitsType":null,"saleUnit":null,"issueProduct":null,"billingSchedule":null,"deferredRevenueAccount":null,"revRecSchedule":null,"stockDescription":null,"isHazmatItem":null,"hazmatId":null,"hazma
[{"createdDate":"2016-06-20T09:34:43.000-07:00","lastModifiedDate":"2017-01-13T01:40:58.000-08:00","customForm":null,"itemId":"10511 (spencer Device)","upcCode":null,"displayName":"10511","vendorName":null,"parent":null,"printItems":false,"isOnline":false,"lastInvtCountDate":null,"nextInvtCountDate":null,"invtCountInterval":null,"invtClassification":null,"isGcoCompliant":null,"offerSupport":false,"useComponentYield":false,"isInactive":false,"subsidiaryList":null,"availableToPartners":null,"includeChildren":null,"department":null,"class":null,"location":null,"description":"spencer Device","cogsAccount":{"internalId":"191","externalId":null,"type":null,"name":"5110 Cost of Goods Sold : Box Cost : Box Unit Costs"},"incomeAccount":{"internalId":"179","externalId":null,"type":null,"name":"4101 Revenues : Box Unit Revenue : Box Revenues"},"intercoIncomeAccount":null,"assetAccount":{"internalId":"144","externalId":null,"type":null,"name":"1441 Inventory, Net : Finished Goods, Net : Finished Goods - Boxes"},"matchBil
git log
git reset --hard c6242d42d9c2b2dcc070a2b8d9cca64ccb3f8805
git push --force origin bugfix/LLR-280
/**
/^(?!\\s)[a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff_-\\s]+(?!\\s)$/ TO BECOME: /^(?!\\s)[a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff-_\\s]+(?!\\s)$/
*/
modchunk.map.inc.php
modsnippet.map.inc.php
modtemplatevar.map.inc.php
/**
and for the build
/^(?!\s)[a-zA-Z0-9\x2d-\x2f\x7f-\xff_-\s]+(?!\s)$/ TO BECOME: /^(?!\s)[a-zA-Z0-9\x2d-\x2f\x7f-\xff-_\s]+(?!\s)$/
*/
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} ^([A-Z]{3,9})\ (.*)//([^\ ]*)
RewriteRule ^ %2/%3 [R=301,L]
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php