Skip to content

Instantly share code, notes, and snippets.

-cur_console:s66H -cur_console:d:c:\xamp\htdocs\current-platform cmd.exe /k "%ConEmuBaseDir%\CmdInit.cmd"
-cur_console:s66H -cur_console:d:c:\xamp\htdocs\current-platform -cur_console:C:"%ConEmuDrive%\Program Files (x86)\Git\etc\git.ico" "%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i
-cur_console:s50H -cur_console:d:c:\xamp\htdocs\current-platform -cur_console:C:"%ConEmuDrive%\Program Files (x86)\Git\etc\git.ico" "%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i
> -cur_console:bs50V -cur_console:d:c:\xamp\htdocs\current-platform -cur_console:C:"%ConEmuDrive%\Program Files (x86)\Git\etc\git.ico" "%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i
@vistajess
vistajess / gist:fde54734086a59becc6c
Created December 14, 2015 12:56
ecommerce_orders.php
<?php
include_once 'includes/headscript.php';
include_once '../config/config_pdo_connection.php';
include_once '../support/courier_class.php';
include_once '../config/directory.php';
$page = $_REQUEST['page'] ?: 1;
$curl = curl_init();
$curlConfig = array(
// CURLOPT_URL => API_V2 . '/users/' . $_SESSION['beone_new_user_id'] . '/orders?page=' . $page,
// CURLOPT_URL => 'http://10.10.2.17:7000/me/orders?access_token=' . $_SESSION['access_token'] . '&page=' . $page,
var Orders = function() {
var showUuid = function(uuid) {
$('#remote_uuid').html(uuid);
};
var mustacheRender = function(temp,obj,target) {
var template = temp.html();
Mustache.parse(template);
var rendered = Mustache.render(template,obj);
handleLimit(elem) {
const { product } = this.props;
const qtyOrdered = cartItem ? cartItem.qty_ordered : 0;
// Checks the difference of the Inventory and Quantity Ordered
const inventoryOrderDifference = product.quantity - qtyOrdered;
const max_chars = inventoryOrderDifference.toString().length;
if(this.state.qty.toString().length > max_chars) {
elem = elem.value.substr(0, max_chars);
}
@vistajess
vistajess / gist:3ebb5bb658eb13f95aa6
Last active January 8, 2016 11:31
Config_db_cred
<?php
//ini_set('max_execution_time', 1000); //300 seconds = 5 minutes
$serverName = $_SERVER['SERVER_NAME'];
$isOneSuper = strpos($serverName, 'onesupershop') !== false;
$isOneLife = strpos($serverName, 'onelifepremium') !== false;
$isOneSuperMart = strpos($serverName, 'onesupermart') !== false;
$isLocal = strpos($serverName, 'localhost') !== false;
if ($isOneSuper) {
define('HostRead', 'haproxy.onesupershop.com');
var MyPurchases = function() {
var handlePurchases = function(api,userid,pageNum) {
$('#datatable_mypurchase').DataTable({
"ajax": api+"/users/"+userid+"/purchases?page="+pageNum,
"columns": [
{ "data": "id" },
{ "data": "net_amount" },
{ "data": "created_at" },
<?php
/*
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', 'phpsessions.wzcirm.cfg.usw2.cache.amazonaws.com:11211');
*/
define('INCLUDES', 'includes');
define('CONFIG', 'config');
$serverName = $_SERVER['SERVER_NAME'];
define('SITE_URL', preg_replace('/(business[.])|(api[.])|(onex[.])|(cart[.])|(www[.])/', '', $serverName));
$isOneLife = strpos($serverName, 'onelifepremium') !== false;
<?php
class LoginClass
{
public function loginUser($params)
{
$loginParams = [
'username' => $params['username'],
'password' => $params['password'],
'grant_type' => 'password',
'client_id' => 'test',
@vistajess
vistajess / gist:a004eaa3094283e122cf
Created November 10, 2015 16:12
config_db_credentials
<?php
//ini_set('max_execution_time', 1000); //300 seconds = 5 minutes
$serverName = $_SERVER['SERVER_NAME'];
$isOneSuper = strpos($serverName, 'onesupershop') !== false;
$isOneLife = strpos($serverName, 'onelifepremium') !== false;
$isOneSuperMart = strpos($serverName, 'onesupermart') !== false;
$isLocal = strpos($serverName, 'localhost') !== false;
if ($isOneSuper) {
@vistajess
vistajess / gist:ebe76cca24009fd24b15
Last active October 26, 2015 06:34
Create multiple Action creators
import {
// imports here
} from '../constants/ActionTypes';
import axios from 'axios';
Number 1:
export default {
getComments() {