Skip to content

Instantly share code, notes, and snippets.

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

Paul Montaño paulmontano

🏠
Working from home
View GitHub Profile
@paulmontano
paulmontano / SoapGroundFreightRateClient.php
Created May 13, 2020 20:50
SoapGroundFreightRateClient.php
<?php
//Configuration
$access = " Add License Key Here";
$userid = " Add User Id Here";
$passwd = " Add Password Here";
$wsdl = " Add Wsdl File Here ";
$operation = "ProcessFreightRate";
$endpointurl = ' Add URL Here';
$outputFileName = "XOLTResult.xml";
@paulmontano
paulmontano / preprocessor_fun.h
Created May 8, 2019 18:46 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@paulmontano
paulmontano / delete_all_tables.sh
Last active April 1, 2018 10:38
Delete All the Tables in the Database
#!/bin/bash
MUSER="$1"
MPASS="$2"
MDB="$3"
MHOST="$4"
# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)
@paulmontano
paulmontano / NBS_CMS_BLOCKS.sql
Created March 27, 2017 09:39
NBS CMS BLOCKS
INSERT INTO `cms_block` (`block_id`, `title`, `identifier`, `content`, `creation_time`, `update_time`, `is_active`)
VALUES
(18, 'Login Info Block', 'login-data', '<div class=\"message info\" style=\"margin-top: 50px;\">\n <p><strong>Try Demo Customer Access</strong></p>\n <p><span style=\"display:inline-block; width: 80px; padding-right: 10px;\">Email:</span>[email protected]</p>\n <p><span style=\"display:inline-block; width: 80px; padding-right: 10px;\">Password:</span>[email protected]</p>\n</div>', '2017-03-15 20:15:19', '2017-03-15 20:15:19', 1),
(19, 'NBS top center navigation links', 'nbs-top-center-navigation-links', '<ul class=\"topbar-links\">\r\n <li><a href=\"#\"><i class=\"icon-card\"></i><span>Loyalty Membership</span></a></li>\r\n <li><a href=\"#\"><i class=\"icon-box\"></i><span>Subscription Boxes</span></a></li>\r\n <li><a href=\"#\"><i class=\"icon-blog\"></i><span>Blog</span></a></li>\r\n <li><a href=\"#\"><i class=\"icon-wishlist\"></i><span>Wishlists</span>
@paulmontano
paulmontano / MAGENTO_SNIPPETS.txt
Last active July 22, 2019 08:29
MAGENTO SNIPPETS
// DIRECTORY PERMISSIONS
// SUDO
sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento
// STANDARD
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
// REMOVE MAGENTO LOGS FROM THE DATABASE DUMP
sed '/INSERT INTO `log_customer`/d' DB_TO_REDUCE.sql | \
sed '/INSERT INTO `log_quote`/d' | \
@paulmontano
paulmontano / somefile.js
Last active March 9, 2017 00:59
Javascript Stuff
// javascript debounce
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
@paulmontano
paulmontano / somefile.scss
Created February 13, 2017 17:40
css thingy
// xy center elements
.somecontainer {
position: relative;
.xy-centered-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
php -f bin/magento setup:install --base-url="http://domain.loc/" --backend-frontname="admin" \
--db-host="localhost" --db-name="db_name" --db-user="db_username" --db-password="db_password" \
--admin-firstname="Magento" --admin-lastname="User" --admin-email="[email protected]" \
--admin-user="admin" --admin-password="123123qa" --language="en_US" --currency="USD" \
--timezone="America/Chicago" --use-rewrites="1"
@paulmontano
paulmontano / .bash_profile
Created November 15, 2016 07:30 — forked from JeffreyWay/.bash_profile
Laravel aliases
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package