Skip to content

Instantly share code, notes, and snippets.

<?php
class PaymentGatewayPayPal extends WireData implements Module, ConfigurableModule {
/*
* Module details, defaults and initialisation
*
*/
public static function getModuleInfo()
<?php
/**
* UserWorkspaces
*
* Example module to hide page in the admin per user per page.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
<?php
/**
* If you want to add-on runtime hooks, validation or additional functionality to Form Builder,
* place this file in /site/templates/form-builder.inc
*
* It will be included by /site/templates/form-builder.php when present.
*
*/
<?php
/**
* If you want to add-on runtime hooks, validation or additional functionality to Form Builder,
* place this file in /site/templates/form-builder.inc
*
* It will be included by /site/templates/form-builder.php when present.
*
*/
$http.get( 'http://...json',{ cache:false } ).success(function (response) {
$scope.data = response.lits;
})
@manviny
manviny / gist:8772374
Created February 2, 2014 18:10
Regex Sublime Text
<A HREF="/municipiosdeespana/municipio/_c_Yohpun480YUplpXd5VLWuCf0i7ns9zXwNfYsRRT60" CLASS="EBDSTYLE_2052">ADEMUZ</A>
(<A HREF=").+(" CLASS="EBDSTYLE_2052">).+(</A>)
@manviny
manviny / JS => PHP
Last active August 29, 2015 13:56
JS => PHP (PW guardar JSON)
angularfile.js
$http({
url: 'myurl/myfile.php',
method: "POST",
data: { 'data' : 'hi' }
})
.then(function(response) {
console.log(response);
},
<?php
$out = '';
// create a new form field (also field wrapper)
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');
<?php
/**
* ProcessWire 'Hello world' demonstration module
*
* Demonstrates the Module interface and how to add hooks.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
@manviny
manviny / gist:9216257
Last active August 29, 2015 13:56
ui-router Resolve
resolve: {
propertyData: function($stateParams, $q) {
// The gapi.client.realestate object should really be wrapped in an
// injectable service for testability...
var deferred = $q.defer();
gapi.client.realestate.get($stateParams.propertyId).execute(function(r) {
deferred.resolve(r);
});