Skip to content

Instantly share code, notes, and snippets.

View jhonnrodr's full-sized avatar
🏠
Working from home

Jhonn Rodriguez jhonnrodr

🏠
Working from home
  • Remote
View GitHub Profile
// Disable the payment/submit button until everything has loaded
// (if Stripe fails to load, we can't progress anyway)
$(document).ready(function() {
$("#payment-button").prop('disabled', false)
})
var handler = StripeCheckout.configure("customButtonA", {
key: '<yourpublishablekey',
token: function(token, args){
var $input = $('<input type=hidden name=stripeToken />').val(token.id);
wget -r -k http://www.sitio.com
$ cd ~/public_html
$ php -S localhost:8000
PHP 5.4.0 Development Server started at Thu Jul 21 10:43:28 2011
Listening on localhost:8000
Document root is /home/me/public_html
Press Ctrl-C to quit
@jhonnrodr
jhonnrodr / gist:c519fbb27b5f91e245a3
Created April 15, 2015 20:47
SSN generator and Validator
http://www.elfqrin.com/usssndriverlicenseidgen.php
www.ssnvalidator.com
@jhonnrodr
jhonnrodr / gist:617917b1a96787758d2d
Created April 15, 2015 20:41
Format and valid SSN number
<?php
/*
PHP Library - Social Security Number-related functions
Copyright (c) 2009, reusablecode.blogspot.com; some rights reserved.
This work is licensed under the Creative Commons Attribution License. To view
a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or
send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
94305, USA.
@jhonnrodr
jhonnrodr / gist:b2954c67f6b58283791a
Created April 13, 2015 01:10
Composer Update - Openshift
curl -s https://getcomposer.org/installer | php -- --quiet --install-dir=$OPENSHIFT_DATA_DIR
php $OPENSHIFT_DATA_DIR/composer.phar update
ln -s public php
http://www.iredmail.org/forum/topic2720-iredmail-support-iredmail-addon-removal.html
a) To remove Policyd:
Remove 'check_policy_service inet:127.0.0.1:10031' and/or 'check_policy_service inet:127.0.0.1:10032' in Postfix config file main.cf, then it's safe to remove policyd package.
b + c) Amavid + ClamAV
Comment out 'content_filter = smtp-amavis:[127.0.0.1]:10024' in Postfix config file main.cf. Then it's safe to remove Amavisd, ClamAV, SpamAssassin packages.
/etc/policyd/cluebringer.conf # poner GREYLISTING=0
use MYSQL cluebringer »Tabla: greylisting "UseGreylisting = 0"
guzzlehttp/guzzle/src/Client.php
$settings = [
'allow_redirects' => true,
'exceptions' => true,
'decode_content' => true,
'verify' => false
];
public function index()
{
$client = new Client();
// Login page
$crawler = $client->request('GET', 'https://email.linc.do/iredadmin/login');
$form = $crawler->selectButton('Login')->form();
$crawler = $client->submit($form, array('username' => '[email protected]', 'password' => 'musica'));
<VirtualHost *:80>
DocumentRoot /var/www/linc/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests Off
<proxy *>
Order deny,allow
Allow from all
</proxy>
ProxyPreserveHost On