Skip to content

Instantly share code, notes, and snippets.

{
"info": {
"_postman_id": "ac491bb7-de4a-4258-b717-ba80070f50fe",
"name": "Magento",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Mine / Me",
"item": [
@obsergiu
obsergiu / clean_list.sh
Created April 1, 2019 15:31
Bash - Remove files/directories ignoring the one from list
#!/usr/bin/env bash
# Old approach - working but
# the bash approach offers
# greater mobility
#GLOBIGNORE=$(paste -s -d : ./config/ignore.list)
#rm -Rf -- {*,.*}
# new line is mandatory as allows
@obsergiu
obsergiu / install_ffmpeg_ubuntu.sh
Last active December 1, 2018 00:16
install_ffmpeg_ubuntu.sh
#!/bin/bash
# Bash script to install ffmpeg
# create default directory
mkdir ~/ffmpeg_build
mkdir ~/ffmpeg_sources
#default tools
@obsergiu
obsergiu / nginx.conf
Created January 11, 2018 11:20 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@obsergiu
obsergiu / local.xml
Created November 27, 2017 16:17 — forked from jasontipton/local.xml
Reorder and Add Class to Top.Links - Magento 1.9 Community Edition
<?xml version="1.0"?>
<!--
[Your site name] XML overrides
-->
<layout version="0.1.0">
<!-- updating top.links to add class names -->
<!-- Section 1: Removing Current Links -->
<default>
<reference name="top.links">
<!-- Removes 'My Account' link -->
@obsergiu
obsergiu / reset_permissions.sh
Created November 18, 2017 21:32 — forked from leek/reset_permissions.sh
Magento - Simple reset file permissions script
#!/bin/bash
#
# Found on StackOverflow:
# http://stackoverflow.com/a/9304264/3765
#
if [ ! -f ./app/etc/local.xml.template ]; then
echo "-- ERROR"
echo "-- This doesn't look like a Magento install. Please make sure"
echo "-- that you are running this from the Magento main doc root dir"
@obsergiu
obsergiu / disable_flat_catalog_product.php
Created November 16, 2017 00:28 — forked from jreinke/disable_flat_catalog_product.php
Magento: Disable flat catalog product on the fly
<?php
/** @var Mage_Catalog_Helper_Product_Flat $helper */
$process = Mage::helper('catalog/product_flat')->getProcess();
$status = $process->getStatus();
$process->setStatus(Mage_Index_Model_Process::STATUS_RUNNING);
/** @var $collection Mage_Catalog_Model_Resource_Product_Collection */
$collection = Mage::getResourceModel('catalog/product_collection'); // Use EAV tables
// ... custom stuff
@obsergiu
obsergiu / meraki_strongswan_notes.md
Created August 13, 2016 23:23 — forked from psanford/meraki_strongswan_notes.md
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan