Skip to content

Instantly share code, notes, and snippets.

Avatar

Ed Eichman EdEichman

View GitHub Profile
@EdEichman
EdEichman / PHP cURL CorreosExpress SeguimientoEnvio
Last active Jun 8, 2020
La documentación de Correos Express para seguimientoEnvios no tiene documentación para PHP. Este Gist explica como llamar a seguimientoEnvios en PHP.
View PHP cURL CorreosExpress SeguimientoEnvio
<?php
//Correos Express SeguimientoEnvio
//necesitaras el documento "DC_SP_apiRestSeguimientoEnviosFechas_03.pdf" - contacta con integraciones de correso express
$id_shipment = {CAMPO numShip DE cex_history};
$url = "https://www.correosexpress.com/wpsc/apiRestSeguimientoEnvios/rest/seguimientoEnvios";
$input_xml = "<?xml version='1.0' encoding='UTF-8'?>
<SeguimientoEnviosRequest xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='SeguimientoEnviosRequest.xsd'>
View password.tpl
{capture name=path}<a href="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" title="{l s='Authentication'}" rel="nofollow">{l s='Authentication'}</a><span class="navigation-pipe">{$navigationPipe}</span>{l s='Forgot your password'}{/capture}
{if isset($change_password)}
<h1 class="page-heading">{l s='Create a new password'}</h1>
{elseif isset($password_changed)}
<h1 class="page-heading">{l s='Password Change'}</h1>
{else}
<h1 class="page-heading">{l s='Forgot your password?'}</h1>
{/if}
View PasswordController.php
<?php
class PasswordController extends PasswordControllerCore
{
public function postProcess()
{
if (Tools::isSubmit('email')) {
$this->sendForgettenPasswordEmail();
} elseif (($token = Tools::getValue('token')) && ($id_customer = (int)Tools::getValue('id_customer'))) {
$this->processForgettenPasswordConfirmation($token, $id_customer);
@EdEichman
EdEichman / MySQL_Logging_Toggle.bat
Created Aug 21, 2015
Windows BAT file to toggle MySQL logging. Set up for default XAMPP installation
View MySQL_Logging_Toggle.bat
@echo off
set /p state="Set MySQL Logging state ON or OFF: "
c:\xampp\mysql\bin\mysql -u "root" -e "SET GLOBAL general_log = '%state%';
%SystemRoot%\explorer.exe "C:\xampp\mysql\data"
@EdEichman
EdEichman / prestashop_product_features.sql
Last active Aug 29, 2015
Prestashop Product Features - to quickly generate a list of features per product
View prestashop_product_features.sql
select
p.id_product,
p.name as name_product,
fl.id_feature,
fl.`name` as name_feature,
fv.value
from
product_lang p
left join feature_product as fp on (p.id_product = fp.id_product)
left join feature_lang as fl on (fl.id_feature = fp.id_feature)
View boxstarter
######################################################
## Boxstarter Dev box install script
######################################################
# Instructions:
############!!!!!!!! USE INTERNET EXPLORER !!!!!!!!!
############!!!!!!!! USE INTERNET EXPLORER !!!!!!!!!
############!!!!!!!! USE INTERNET EXPLORER !!!!!!!!!
@EdEichman
EdEichman / Ed's Zenburn
Created May 14, 2015
Ed's PuTTY zenburn theme for windows. Save into a .reg file, set YOUR_SESSION_NAME to the name of your PuTTY session where you want to apply the colors, save and run the .reg file. Zenburn picked up from http://looselytyped.blogspot.com.es/2013/02/zenburn-pleasant-color-scheme-for-putty.html. Addition of LineCodePage for CentOS7, and a larger fo…
View Ed's Zenburn
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\YOUR_SESSION_NAME]
"Colour0"="255,255,255"
"Colour1"="255,255,255"
"Colour2"="51,51,51"
"Colour3"="85,85,85"
"Colour4"="0,0,0"
"Colour5"="0,255,0"
"Colour6"="77,77,77"
@EdEichman
EdEichman / GMail API - Getting past OAuth
Last active Aug 4, 2017
PHP Gmail API - getting past OAuth
View GMail API - Getting past OAuth
<?php
//Create a composer project in PHP storm, and use their support for loading the needed includes.
//https://developers.google.com/api-client-library/php/start/installation
//https://www.jetbrains.com/phpstorm/help/composer-project-dialog.html
require_once 'autoload.php';
//the google code shown in https://www.youtube.com/watch?v=zSyGkfW9qY4 counts on the session
session_start();
@EdEichman
EdEichman / zopim_defer.js
Last active Apr 14, 2021
Defer Loading Zopim until page is loaded (to avoid long load delay), based on article http://www.feedthebot.com/pagespeed/defer-loading-javascript.html
View zopim_defer.js
//basic zopim widget code, from their site
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//v2.zopim.com/?26Smu9lv0NXQEOOg8IAZrMPh9yQstAcV';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
//make sure zopim does not show till we know we have department agents
var intial_zopim_hiding_done = false;