Skip to content

Instantly share code, notes, and snippets.

View centerax's full-sized avatar
✈️

Pablo S. Benitez centerax

✈️
View GitHub Profile
#!/bin/sh
# http://www.alfredklomp.com/programming/shrinkpdf
# Licensed under the 3-clause BSD license:
#
# Copyright (c) 2014-2019, Alfred Klomp
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@erikhansen
erikhansen / README.md
Last active February 28, 2023 13:59
Patch Magento 2 extension that must be installed in app/code

See also this alternative approach: https://gist.github.com/cmtickle/8900629447429126ffd7ff84e56ec780#to-patch-code-in-appcode

If you need to patch an M2 extension that isn't available to be installed via Composer, and you're concerned about losing edits directly to files in app/code/<Vendor> directory, you can install and then patch the extension locally using these steps:

  1. Copy the extension into an arbitrary folder location like app/code/packages/VendorName/ModuleName (this assumes this module has a composer.json file with the package name of vendorname/module-modulename)

  2. Run this command to add your custom package location to the composer repositories list:

    composer config repositories.vendorname/module-modulename path app/packages/VendorName/ModuleName
    
  3. Require the extension:

@Tenzer
Tenzer / 000-README.md
Last active January 18, 2024 07:02
LastPass Pwned Passwords checker

LastPass Pwned Passwords checker

This is a script for checking if any of the passwords you have stored in LastPass have been exposed through previous data breaches.

To use the script you need to have Python 3 installed and you need a CSV export of your LastPass vault. The export can be generated from the LastPass CLI with:

lpass export > lastpass.csv

or can be extracted with the browser plugin by going to the LastPass icon → More Options → Advanced → Export → LastPass CSV File (note that I did have problems getting this to work).

@cmtickle
cmtickle / unbuffered_shell_example.php
Created January 31, 2018 14:55
Use unbuffered SQL queries with Magento to reduce memory usage on large data sets.
<?php
require_once 'abstract.php';
class Cmtickle_Demo_Shell_Tool extends Mage_Shell_Abstract
{
private $_readConnection = null;
protected function _getReadConnection()
{
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@piotrekkaminski
piotrekkaminski / docker_beta.md
Last active April 10, 2017 23:56
Docker Beta Installation Info & FAQ
@avoelkl
avoelkl / checks.md
Last active June 16, 2016 17:09
PayPal Security Update on June 17th 2016

So, here's the thing: PayPal is rolling out a security update on June 17th 2016. A friday, for the joy of all developers and agencies I think. Those who are not prepared and did not check the requirements first will have websites/shops with a non-working PayPal integration after June 17th.

The main 2 points are:

Support SHA-256

PayPal is upgrading SSL certificates on all Live and Sandbox endpoints from SHA-1 to the stronger and more robust SHA-256 algorithm. You will need to update your integration to support certificates using SHA-256.

Discontinue use of the VeriSign G2 Root Certificate

@alankent
alankent / pkglist.php
Created May 13, 2016 04:59
Connect to Magento 2 Composer repo and list packages you can access
<?php
/**
* Return the path of the auth.json file.
*/
function findAuthJson() {
// Windows sets HOMEDRIVE and HOMEPATH, but cygwin sets HOME.
if (!isset($_SERVER["HOME"]) && isset($_SERVER["HOMEDRIVE"])) {
@alankent
alankent / validate_m2_package.php
Last active February 15, 2016 10:39
Magento Marketplace beta Composer package ZIP file validator script.
#!/usr/bin/php
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See https://github.com/magento/magento2/blob/develop/COPYING.txt for license details.
*/
/**
* validate_m2_package.php - a script that checks a given M2 zip package to ensure
* it is structured correctly and has all the required files.
@marcinwol
marcinwol / setup_proxychains-ng.sh
Last active November 9, 2023 15:54
Setup and test proxychains-ng on Ubuntu 14.04
# if you havent done it yet, please download the tor-browser and start it
# https://www.torproject.org/download/download-easy.html.en
wget https://www.torproject.org/dist/torbrowser/5.0/tor-browser-linux64-5.0_en-US.tar.xz
tar xf tor-browser-linux64-5.0_en-US.tar.xz
# download the source of proxychains-ng
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng