Skip to content

Instantly share code, notes, and snippets.

@dhaupin
dhaupin / disavow_txt
Created April 10, 2017 14:55
Blacklist - Domain Disavow List for Home & Garden
domain:0ch.biz
domain:0directory.com
domain:0fees.net
domain:0l0.us
domain:1000yt.com
domain:150m.com
domain:2659dh.com
domain:2ads.co.uk
domain:2dns.cn
domain:3moz.co.uk
@dhaupin
dhaupin / dev_script_vt_notify_cleaner.js
Last active March 31, 2017 01:17
Vtiger - VTExperts Notification JS Cleaner
// Cleans out notifications from this Vtiger plugin
// (For those without privs to see the global list)
// https://www.vtexperts.com/product/vtiger-notifications-reminders/
function notifDestroyer(dataTarget = $('[data-id]'), speed = 600, limit = 500) {
var i = 0;
dataTarget.each(function(i, v) {
var this_id = $(this).attr('data-id');
@dhaupin
dhaupin / dev_ssl_cipher_list.txt
Last active July 31, 2017 20:07
SSL - Some ciphers for use on cPanel or other servers
### To Verify
openssl ciphers -v 'A_CIPHER_LIST'
nmap --script ssl-enum-ciphers -p 443 123.123.123.123
### Apache
ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!eNULL:!PSK:!3DES:!DES:!DSS:!RC4:!MD5
Proto: +TLSv1.1 +TLSv1.2
### cPanel Web Services
ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:HIGH:!aNULL:!eNULL:!PSK:!3DES:!DES:!DSS:!RC4:!MD5:!EDH
@dhaupin
dhaupin / dev_script_cron_cli_dump.php
Last active January 17, 2017 15:51
Function - CRON - Check out how PHP-CLI runs cron to understand various env vars
<?php
// Run this script with cron as php-cli under a user account (or root if using crontab -e).
// It will echo infos about the SAPI and server/environment variables
$php_cli[1] = '';
if (isset($_ENV['_'])) {
$php_env = $_ENV['_'];
} elseif (isset($_SERVER['_'])) {
@dhaupin
dhaupin / dev_script_seo_field_lengths.js
Created December 16, 2016 18:50
Function - SEO - Look at input fields and display their current length as well as current cursor position
// Field needs data attrb like: <input name="title" data-seo-length="70" />
// Underscore library required for _.debounce() function
// https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js
<script type="text/javascript">
var count_name = $('input[name="title"]'),
stg_name = '<br/><div style="font-family:arial;font-style:italic;margin-top:5px;color:#969696;">&nbsp;&nbsp;SEO Chars: <span class="stg_name">' + count_name.val().length + '</span> of ' + count_name.attr('data-seo-length') + '. <span class="stg_name_cur">Cursor: 0</span></div>';
count_name.after(stg_name).on('keyup mouseup mouseleave', _.debounce(function(){
$('.stg_name').html($(this).val().length);
@dhaupin
dhaupin / etc_bash.bashrc.sh-apps
Last active November 20, 2017 15:05
Random Bash Aliases & Functions
backup-oc() {
accnt=account
prefix=prefix
path=subfolder (no pre or trailing slash)
if [ ! -d "/backup/_SYNC/${accnt}" ]; then
mkdir -p /backup/_SYNC/${accnt}
fi
if [ ! -d "/home/${accnt}/_SYNC" ]; then
@dhaupin
dhaupin / userDefineLang.xml
Created October 26, 2016 15:39
Notepad++ Wombat Theme - Modified Colors, Added TPL, Added Smarty
<NotepadPlus>
<UserLang name="Smarty-DH" ext="tpl" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00{* 01 02*} 03 04*</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@dhaupin
dhaupin / dev_script_cm_dialog_wrapper.js
Last active September 7, 2016 19:23
Function - Provides a way to create a dialog/popup/modal for images in CS-Cart
{literal}
<script type="text/javascript">
// @@MODIFICATION@@ Applies cm-dialog wrapper to images that have the class="cm-dialog-img"
$('img.cm-dialog-img').each(function() {
var src = ($(this).attr('data-ca-src')) ? $(this).attr('data-ca-src') : $(this).attr('src'),
title = ($(this).attr('alt') != undefined) ? ' title="' + $(this).attr('alt') + '"' : '',
base = location.protocol + "//" + location.host,
uri = src.replace(base, '').replace('/images/', ''),
uniq = Math.round(new Date().getTime() / 10000 * Math.random());
target_id = uri.replace(/http(s)?(:)?(\/){0,2}/g, '').replace(/\/|_|%20/g, '_').replace(/\./g, '-').split("?")[0].toLowerCase() + '-' + uniq;
@dhaupin
dhaupin / etc_nginx_sites-available_template.bak
Last active September 7, 2016 20:11
Server - Nginx default configs for NO-SSL and SSL enabled server blocks - Uses LetsEncrypt and FPM Unix sockets
server {
listen 80;
listen [::]:80;
server_name EXAMPLE.com www.EXAMPLE.com;
return 301 https://EXAMPLE.com$request_uri;
}
server {
listen 443 ssl http2;
@dhaupin
dhaupin / india_derps_like_its_1999.txt
Created August 8, 2016 17:27
Offshore India App Development -> Herds of 13 Year Old Kids Behind Amateur SEO Spam Bots, Calling Themselves "Executives" -> I R Need Webshite
We need a Wordpress plugin that can sync up to a simple O/CON 2 bridge to be the primary sine-sync for all O/XSPRC virt method drivers in the RLPROC schema for the notorious Rn237a-rev45 Kuborn platform. Comms must be authenticated with qAuth and retina scan, and run from our Wordpress API. This plugin should allow full remote driver binary mitigations with FULL templated proxy bytemaps which should allow us to quarantize O/CON nodes on demand. I cant stress FULL templated enough, all of our other bids come back as burst templated which, as you know, causes sine mismatch modulations on that specific Kuborn series. We need clean data. Clean. Clean. Clean.
Your plugin must then use templated half-byte functions to bootstrap + rebuild the loss prevent schema which will bring systems back online after either bus overheat or during routine bench checks. Eventually we will solve the bus overheat, but if you have ideas there, we are all ears. As a note, this system must support full O/XSPRC triplex mode during BIOS