Skip to content

Instantly share code, notes, and snippets.

View bluepnume's full-sized avatar

Daniel Brain bluepnume

  • OneText
  • San Jose
View GitHub Profile
/*
Usage:
1. Place loader in a webpack loader directory
2. Add the following to webpack loader configuration:
{ test: /angular(\.min)?\.js/, loader: 'angular-remove-di' },
*/
function removeAngularDI(angular) {
/*
Usage:
1. Place loader in a webpack loader directory
2. Add the following to webpack loader configuration:
{ test: /\.js/, loader: 'angular-es6-interop', exclude: /node_modules|jquery|angular(\.min)?\.js|\.build/}
*/
function findAll(regex, string, unique) {
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://www.paypalobjects.com/api/button.js"></script>
<script src="./dist/paypal.checkout.v4.js" data-env="production" data-paypal-checkout></script>
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://www.paypalobjects.com/api/button.js"></script>
<script src="./dist/paypal.checkout.v4.js" data-env="production" data-paypal-checkout></script>
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://www.paypalobjects.com/api/button.js"></script>
<script src="./dist/paypal.checkout.v4.js" data-env="production" data-paypal-checkout></script>
# put this at the top of your file
def warnjilly(method):
def wrapper(*args, **kwargs):
try:
return method(*args, **kwargs)
except Exception, e:
print '!!!! Oh no jilly, something went wrong !!!!'
print e
return wrapper
radial-gradient(50% 50%, ellipse closest-corner, rgba(0,0,0,0.6) 1%, rgba(0,0,0,0.8) 100%);
// Before -------------------------------------------
<script>
window.paypalCheckoutReady = function () {
paypal.checkout.setup("8J7EEJME4CLSA", {
environment: 'sandbox',
buttons: [{ container: 'paypalContainer', color: 'blue', size: 'medium', shape: 'rect' }],
click: function (event) {
event.preventDefault();
var postData = 'SiteId=1&f=GetPayPalRedirect&OrderId=206156';
@bluepnume
bluepnume / foo.js
Last active January 27, 2017 19:13
function foo(x) {
var foo,
bar,
baz,
i,
j,
x,
y;
function foo() {
"use strict";
var a = 1;
var b = 2;
return [a, b];
}
foo.js