This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$comments = @' | |
Script name: DerpExcelGoodness.ps1 | |
Thanks to Kent Finkle | |
Purpose: How can I use Windows Powershell to Open All the Excel Spreadsheets in a Folder | |
and Run a Specified Macro Found on those Spreadsheets? | |
Need to edit: $a = $xl.Run("C:\Users\<USER>\Documents\PERSONAL.XLSB!Clean") | |
directory dont work yet - this is stored in Documents Folder | |
Macros can be called in daisy chain. | |
File types to remember: 6 - csv; 51 - xlsx | |
'@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub BoldHeaders() | |
' | |
' Bold Macro | |
' | |
' | |
Rows("1:1").Select | |
Selection.Font.Bold = True | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preferred rsync attrs, requires v3.1.0 or higher | |
# h: human-readable | a: archive mode (equals -rlptgoD) | v: verbose | X: extended attrs | |
# --info=progress-2 is the bees' knees - gives you human readable progress | |
# --ignore-errors prevents crashing | |
# --append-verify to resume transfer | |
# Optional: --log-file=[file] - i.e. --log-file=/Users/me/wherever/rsync.log | |
# --checksum: md5 checking | |
rsync -havX --info=progress2 [source] [target] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adapted from http://www.thewindowsclub.com/export-import-passwords-chrome-browser | |
Referencing: https://support.1password.com/create-csv-files/ | |
1. In Google Chrome, then type “chrome://flags” in the address bar. | |
2. When the flags window loads, hit CMD+F/Ctrl+F and search for "password import and export." Select Enabled to turn the flag on. Click the link to relaunch your browser enact the changes. | |
3. After relaunching the browser, navigate to Chrome settings menu by entering chrome://settings in the address bar. Scroll down to the bottom and click on Show advanced settings. | |
4. Scroll down further through Advanced settings to section named "Passwords and Forms." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is useful if you have an emergency break on a git-to-deploy site, like a Wordpress WPEngine git push site. | |
## you grab the hash and force it to the remote name - i.e. origin, production, staging, etc. | |
## Be sure to git blame to yell at whoever borked it (Unless you're the sole developer on the project!) and trace your bugs! | |
git push -f staging 17ee2f0b24b6af6e03352ed71b7384639e6239ed:master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_enqueue_style( 'stylesheet', get_stylesheet_uri(), false, filemtime(get_stylesheet_directory() . '/style.css') ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CSS example: (see wp_enqueue_style in the WP Codex) | |
function appcss() { | |
$app = '/stylesheet/app.css'; // Local path in theme | |
$appURI = get_stylesheet_directory_uri() . $app; | |
$appPath = get_template_directory() . $app; | |
wp_enqueue_style('app', $appURI , array(), | |
filemtime( $appPath ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'appcss' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Injects ads into the content at a | |
* specified paragraph length | |
* by filtering the_content(). | |
* | |
* @return \$content | |
*/ | |
public function ad_injector( $content ) { | |
if( is_single( ) ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Used to dequeue stuff - we're making text only stuff | |
function find_cripts() { | |
global $wp_scripts; | |
foreach( $wp_scripts->queue as $handle ) : | |
echo $handle . ' <br />'; | |
endforeach; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* | |
* Plugin Name: AMP Override: Turn off 'Default' amp settings | |
* Plugin URI: http://leopostovoit.com | |
* description: Change or disable 'Default' amp settings for themes with default AMP declaration (e.g. like WP Rig, Neva, Astra, etc.) | |
* Version: 0.1 | |
* Author: Leo Postovoit | |
* Author URI: http://leopostovoit.com |