Skip to content

Instantly share code, notes, and snippets.

View srmklive's full-sized avatar

Raza Mehdi srmklive

View GitHub Profile
When running any composer commands, sometimes you see the following error stack:
```
[ReflectionException]
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
[ErrorException]
@srmklive
srmklive / gist:887e3aea58fb2e8867bf
Last active November 2, 2015 13:32
Install NodeJS on Linux using Standard Binary packages downloaded from https://nodejs.org
## Step 1: Check System Architecture.
getconf LONG_BIT
uname -p
## Step 2: Download the latest version. current LTS release is 4.2.1.
wget https://nodejs.org/dist/v4.2.1/node-v4.2.1-linux-x64.tar.gz
## Step 3: Installing the downloaded binary
tar -C /usr/local --strip-components 1 -xzf node-v4.2.1-linux-x64.tar.gz
@srmklive
srmklive / gist:aa377b9995acebc0e16f
Created October 24, 2015 15:25
Automatically trigger stripe checkout form
<form name="checkoutform" action="/payment" method="POST">
<input type="hidden" name="stripeToken" id="stripe_token" />
</form>
<script src="https://checkout.stripe.com/checkout.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<button id="customButton" style="display:none;">Purchase</button>
<script>
var handler = StripeCheckout.configure({
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person