Skip to content

Instantly share code, notes, and snippets.

Avatar

Barbara Talbot barbwiredmedia

View GitHub Profile
View gist:fc6fdbf4f5387d13df70cc185abbbcb9
#https://www.makeuseof.com/tag/5-ways-to-print-folder-and-directory-contents-in-windows/
dir>print.txt
@barbwiredmedia
barbwiredmedia / .htaccess
Last active Apr 6, 2017
Htaccess WordPress permissions to lock down wp-login.php and other files
View .htaccess
#Files
Options All -Indexes
<files .htaccess>
Order allow,deny
Deny from all
</files>
#WordPress
<files wp-login.php>
order deny,allow
@barbwiredmedia
barbwiredmedia / scriptfix.js
Last active Dec 6, 2016
Magnific Popup uses the watch URL format for its popup. By default it does not accept URL parameters I.E. Do not show related videos, Autoplay and Youtube branding -- ?rel=0&autoplay=1&showinfo=0 Adding the JS fixes this. Solution credit:Josue @ http://www.kriesi.at/support/topic/youtube-video-not-working-in-ligthbox/#post-288867
View scriptfix.js
<script>
/*Substitute your id in src*/
jQuery(window).load(function(){
jQuery('a[href*="youtube.com/watch"]').magnificPopup({
type: 'iframe',
iframe: {
patterns: {
youtube: {
index: 'youtube.com',
id: 'v=',
@barbwiredmedia
barbwiredmedia / terms-and-conditional.html
Created Nov 11, 2016
Terms and conditional boilerplate. Replace "placeholder" content
View terms-and-conditional.html
<p><strong>What information do we collect?</strong></p>
<p>We collect information from you when you subscribe to our newsletter or fill out a form.</p>
<p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address or phone number. You may, however, visit our site anonymously.</p>
<p>Google, as a third party vendor, uses cookies to serve ads on your site. Google’s use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p>
<p><strong>What do we use your information for?</strong></p>
<p>Any of the information we collect from you may be used in one of the following ways:</p>
<p><em>• To contact you following the form you filled out.</em><br>
Your information, whether public or private, will not be sold, exchanged, transferred, or given to any other company for any reason whatsoever
@barbwiredmedia
barbwiredmedia / privacy-policy.html
Last active Nov 11, 2016
Privacy Policy Standard. Only change needed is change to the contact-us URL
View privacy-policy.html
<h1>Privacy Policy</h1>
<p><em>What information do we collect?</em></p>
<p>We collect information from you when you subscribe to our newsletter or fill out a form.</p>
<p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address or phone number. You may, however, visit our site anonymously.</p>
<p>Google, as a third party vendor, uses cookies to serve ads on your site. Google’s use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p>
<p><em>What do we use your information for?</em></p>
<p>Any of the information we collect from you may be used in one of the following ways:</p>
<ul>
<li>To contact you following the form you filled out. &nbsp;Your information, whether public or private, will not be sold, exchanged, transferred, or given to any other company for any r
View gist:a6f2bcd0128e74e9fe5a6de568496e05
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
# wordpress specific
wp-config.php
@barbwiredmedia
barbwiredmedia / admin-functions.php
Last active Jul 6, 2018
Edit and Hide Admin menu items admin_menu & admin_bar_menu. Also hide items from the item bar
View admin-functions.php
function remove_acf_menu()
{
// provide a list of usernames who can edit custom field definitions here
$admins = array(
'admin',
'levy-admin',
'barb'
);
@barbwiredmedia
barbwiredmedia / hosts
Last active Aug 29, 2017
Godaddy cPanel WordPress site testing. For apache hosts file. Spoofs URL for checking a sites functionality/working before switching DNS. IP will be from cPanel. Domain in database must match.
View hosts
# To test Godaddy cPanel WordPress site:
#1) Add cPanel IP then domain
#2) ipconfig /flushdns
#3) ping yourdomain.com to check that it is forwarding
# EXAMPLE:
23.229.216.195 thorcon.net
23.229.216.195 www.thorcon.net
@barbwiredmedia
barbwiredmedia / img-responsive.sass
Created Apr 22, 2016
WP responsive image within WYSIWYG content
View img-responsive.sass
.main {
img[class*="wp-image"] {
@include img-responsive;
}
@include bp-md-max {
@include center-block;
float:none;
}
}
You can’t perform that action at this time.