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 / 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:
@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;
/**
* Abstract rule condition based on properties
*/
abstract class EcomDev_Rule_Model_Rule_Condition_Abstract extends Mage_Rule_Model_Condition_Abstract
{
protected $_properties = null;
/**
* Should return a label of the current condition
*
# First, enable SSH in the Administration->System tab.
# Then log in to the device.
# Verify that https_crt_save is off
admin@RT-N66U:/tmp/home/root# nvram get https_crt_save
0
# Enable https_crt_save and verify that it was set correctly
admin@RT-N66U:/tmp/home/root# nvram set https_crt_save=1
admin@RT-N66U:/tmp/home/root# nvram get https_crt_save