Skip to content

Instantly share code, notes, and snippets.

View soberanes's full-sized avatar
🥑
Enjoying

Paul Soberanes soberanes

🥑
Enjoying
View GitHub Profile
@soberanes
soberanes / SoapClient.php
Created December 7, 2017 18:18 — forked from umpirsky/SoapClient.php
PHP SOAP client for .NET SOAP server
<?php
class SoapClient extends \SoapClient {
function __doRequest($request, $location, $action, $version, $one_way = null) {
$headers = array(
'Method: POST',
'Connection: Close',
'User-Agent: PHP Soap Client',
@soberanes
soberanes / Form.php
Created November 8, 2017 21:54 — forked from ScreamingDev/Form.php
Mage - Adminhtml - Form fields (simple)
<?php
// text
$fieldset->addField('title', 'text', array(
'label' => Mage::helper('form')->__('Title3'),
'class' => 'required-entry',
'required' => true,
'name' => 'title',
'onclick' => "alert('on click');",
'onchange' => "alert('on change');",
@soberanes
soberanes / HTML Character Codes
Created September 15, 2017 14:46 — forked from jonathansousa/HTML Character Codes
HTML: Character Codes
Name Character Entity
Copyright © &copy;
Registered ® &reg;
Trademark ™ &trade;
Curly Open Double Quote “ &ldquo;
Curly Closed Double Quote ” &rdquo;
Curly Open Single Quote ‘ &lsquo;
Curly Closed Single Quote ’ &rsquo;
Big Bullet/Dot • &bull;
@soberanes
soberanes / function.php
Created March 5, 2015 23:08 — forked from hlashbrooke/function.php
Random password generator
<?php
function random_password( $length = 8 ) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?";
$password = substr( str_shuffle( $chars ), 0, $length );
return $password;
}
$password = random_password(8);
?>
@soberanes
soberanes / index.html
Last active August 29, 2015 14:13 — forked from adilapapaya/README
Example code for exporting data in a table to a csv file.
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Adila Faruk">
<title>Exporting Data to a CSV File</title>
<?php
use Zend\Db\Sql\Select;
// basic table
$select0 = new Select;
$select0->from('foo');
// 'SELECT "foo".* FROM "foo"';
@soberanes
soberanes / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console