Skip to content

Instantly share code, notes, and snippets.

View adrian-green's full-sized avatar

Adrian Green adrian-green

View GitHub Profile
@adrian-green
adrian-green / install
Created May 15, 2018 02:53 — forked from mfrister/install
Fix Ubuntu VMs not suspending in VMware Fusion
# Paste into a root shell on your Ubuntu VM
curl -L https://gist.githubusercontent.com/meeee/5e252e93ba4589e67cf3/raw/faa25d74545ca527d713df2b843da43af3cf92ea/network > /etc/init.d/network && \
chmod +x /etc/init.d/network && \
echo "Suspend fix installed."
@adrian-green
adrian-green / generate_magento_urn_to_xsd_mapping.php
Created February 17, 2018 04:54 — forked from Flyingmana/generate_magento_urn_to_xsd_mapping.php
a script to easily add a config to map all the magento URNs to their actual files in a project
<?php
/**
* license is MIT, you will find the text of it in the internet
*/
echo "start generation script\n";
function getAllSchemaFilePaths()
{
@adrian-green
adrian-green / README.md
Created December 11, 2017 23:30 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@adrian-green
adrian-green / SimpleStore.js
Created July 20, 2017 01:15
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@adrian-green
adrian-green / gist:376553b56068144c94d3331094daf72d
Created March 16, 2017 06:47 — forked from discordier/gist:ed4b9cba14652e7212f5
options for phpStorm @noinspection annotation
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@adrian-green
adrian-green / Events fired during order submit process
Last active April 29, 2016 15:38
Main events fired during one-page checkout in Magento
### Events during order submit process
`core_copy_fieldset_customer_account_to_quote`
`core_copy_fieldset_sales_convert_quote_to_order`
`sales_convert_quote_to_order`
`core_copy_fieldset_sales_convert_quote_address_to_order`
`sales_convert_quote_address_to_order`
`core_copy_fieldset_sales_convert_quote_address_to_order_address`
`sales_convert_quote_address_to_order_address`
@adrian-green
adrian-green / Image.php
Last active March 21, 2016 06:52
bad code
<?php
<?php
/**
* SupportDesk_FixAcl.php v1.1
* SupportDesk (www.supportdesk.nu)
* 10/7/2015
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* It is available through the world-wide-web at this URL:
<?php
umask(0);
ini_set('memory_limit','512M');
set_time_limit(0);
if(file_exists('app/Mage.php')) require 'app/Mage.php';
else require '../../app/Mage.php';
// Init without cache so we get a fresh version
Mage::app('admin','store', array('global_ban_use_cache' => TRUE));
@adrian-green
adrian-green / bind_config.pl
Last active August 29, 2015 14:26 — forked from terminalfool/bind_config.pl
A BIND ad filter refresh script. Loads ad domains from adblock plus filters
#!/usr/bin/perl
use strict;
use Proc::Simple;
use Proc::Killall;
use Time::localtime;
use LWP::Simple qw($ua getstore);
$ua->agent("");
use Mozilla::CA;