Skip to content

Instantly share code, notes, and snippets.

@xxorax
xxorax / env.php
Last active September 18, 2023 23:49 — forked from dianabotean/env.php
move open source queues to rabbit
[
(...)
'queue' => [
'amqp' => [
'host' => '<rabbitmq_host>',
'port' => '<rabbitmq_port>',
'user' => '<rabbitmq_user>',
'password' => '<rabbitmq_pass>',
'virtualhost' => '/',
'ssl' => false
@xxorax
xxorax / README.md
Created December 5, 2022 22:13 — forked from mul14/README.md
[Linux] [Firefox] Open link in browser, which is in current workspace

I use separate Firefox profiles for work and personal stuff. To distinguish those I place them on different workspaces.

  • Workspace 0: firefox --no-remote -P MyJob
  • Workspace 1: firefox --no-remote -P default

I have also company Slack on Workspace 0. Which usually contains links to some work stuff.

The problem

@xxorax
xxorax / getMagentoPatches.php
Created November 3, 2015 11:19 — forked from Schrank/getMagentoPatches.php
Download all magento patches (once), and sort them into the correct directory, so you have all patches for a single version by hand.
class PatchDownloader
{
/**
* @var string
*/
private $infoUrl = "https://MAGEID:[email protected]/products/downloads/info/filter/version/";
/**
* @var string
*/
private $downloadUrl = "https://MAGEID:[email protected]/products/downloads/file/";
@xxorax
xxorax / fix-url-keys.php
Last active September 11, 2015 17:11 — forked from Vinai/fix-url-keys.php
This fixes the duplicate url_key issue in a Magento 1.8 / 1.13 installation.
<?php
/**
* Drop this into the shell directory in the Magento root and run with -h to see all options.
*/
require_once 'abstract.php';
/**
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints.
#!/bin/bash
set -e
container_id=$1
if [ -z $container_id ]; then
echo "usage: sudo docker-nsenter <container_id> [args ...]"
exit 1
fi
target=`docker inspect --format '{{.State.Pid}}' $container_id`
nsenter --mount --uts --ipc --net --pid --target $target ${@:2}
#!/bin/bash
# An alternative to "links", run this script after starting or stopping any
# container. It's a hack to update the host machine (vagrant) /etc/hosts with
# the current active docker containers and tell dnsmasq to refresh.
#
# Then start each machine with "-dns ${DOCKER_HOST_IP}", e.g.
# $ docker run -d -name mycontainer1 -dns 10.0.3.1 MYPRODUCT
# You can't seem to set the DNS during "docker build".
#
# Diagnostic command to run in host or while logged into containers:
<?php
$mageFilename = __DIR__.'/app/Mage.php';
require_once($mageFilename);
Mage::init();
$templates = array(
array(
"name" => "New Invoice",
<!doctype html>
<html ng-app="myApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script type="text/javascript">
var myApp = angular.module('myApp', [], function ($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
void function() {//closure
var global = this
, _initKeyboardEvent_type = (function( e ) {
try {
e.initKeyboardEvent(
"keyup" // in DOMString typeArg
, false // in boolean canBubbleArg
, false // in boolean cancelableArg
, global // in views::AbstractView viewArg