Skip to content

Instantly share code, notes, and snippets.

View xus's full-sized avatar
:octocat:
Coding

Jesús López xus

:octocat:
Coding
  • NetRivals / Lengow
  • Girona / Barcelona
View GitHub Profile
@xus
xus / Google Analytics PHP Sample ReadME
Created November 19, 2020 11:26 — forked from LindaLawton/Google Analytics PHP Sample ReadME
Oauth example for PHP and the Google Analytics reporting api v4 with pagination.
For service account auth include:
require_once __DIR__ . '/ServiceAccount.php';
For Oauth2 include:
require_once __DIR__ . '/Oauth2Authentication.php';
Note: To reset the auth for oauth to just unset the sessions
@xus
xus / DirectoryStructure
Created June 11, 2020 12:18 — forked from satooshi/DirectoryStructure
Directory structure of Domain Driven Design application with Symfony2, Doctrine2.
sf2-ddd
├── app
├── bin
├── build
├── lib
├── src
│   └── __VendorPrefix
│   ├── Application
│   │   └── __DomainNameBundle
│   │   ├── Command
@xus
xus / cleanup_uft8_class.php
Created May 23, 2017 12:13 — forked from zeroasterisk/cleanup_uft8_class.php
A PHP class to cleanup strings to be UTF8
<?php
/* Standardized data cleanup helper class */
class Cleanup {
/**
* Make a string into UTF8 compliant... cleans funcky input characters
* @param mixed $str
* @return mixed $str
*/
static function makeUTF8($str) {
if (is_array($str)) {

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name