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
#!/bin/bash | |
sudo add-apt-repository ppa:danielrichter2007/grub-customizer && | |
sudo apt-get update && | |
sudo apt-get install grub-customizer | |
# All on one line! | |
# sudo add-apt-repository ppa:danielrichter2007/grub-customizer && sudo apt-get update && sudo apt-get install grub-customizer |
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
@echo off | |
SET st2Path=C:\Program Files (x86)\Brackets\Brackets.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets" /t REG_SZ /v "" /d "Open with Brackets" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Brackets" /t REG_SZ /v "" /d "Open with Brackets" /f |
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
wp media regenerate $(wp eval 'foreach (get_posts(array("posts_per_page" => -1 )) as $id) { echo get_post_thumbnail_id($id) . " "; };' ) |
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 | |
/** | |
* Remove excerpts from the archive pages only | |
* https://generatepress.com/forums/topic/remove-excerpt-from-the-archive-pages/#post-898902 | |
*/ | |
add_filter('wp_trim_excerpt', 'db_excerpt_metabox_remove'); | |
function db_excerpt_metabox_remove($excerpt) | |
{ |
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
{ | |
"generator": "Code Snippets v2.14.0", | |
"date_created": "2021-01-30 18:21", | |
"snippets": [ | |
{ | |
"name": "GP Remove website field from comment form", | |
"desc": "Remove the website field from a WordPress comment form, this is known to work well with Generate Press. There is no need for the website field anymore it is usually only used for spammy backlinks that are going to be \"no followed\" anyways.", | |
"tags": ["php", "WordPress", "Comments"], | |
"scope": "global", | |
"code": "add_action( 'after_setup_theme', 'tu_add_comment_url_filter' );\nfunction tu_add_comment_url_filter() {\n add_filter( 'comment_form_default_fields', 'tu_disable_comment_url', 20 );\n}\n\nfunction tu_disable_comment_url($fields) {\n unset($fields['url']);\n return $fields;\n}", |
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 | |
function ej_add_theme_colors_to_gutenberg() | |
{ | |
add_theme_support('editor-color-palette', array( | |
array( | |
'name' => esc_attr__('AWD Orange Red', 'EricJohnson'), //brand color | |
'slug' => 'awd-orange-red', | |
'color' => '#f94341', | |
), | |
array( |
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
sudo snap install chromium htop vlc signal-desktop && sudo snap install code --classic && sudo snap install powershell --classic && sudo snap install node --channel=15/stable --classic && sudo snap install vim-editor --beta && alias vim='vim-editor' && alias cd..='cd ..' && sudo apt install git --yes && git config --global user.name "Eric J" |
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
add_action( 'wp_footer', function () { ?> | |
<script> | |
document.addEventListener("DOMContentLoaded", function () { | |
// remove subdomain of current site's url and setup regex | |
var internal = location.host.replace("www.", ""); | |
internal = new RegExp(internal, "i"); | |
var a = document.getElementsByTagName("a"); // then, grab every link on the page | |
for (var i = 0; i < a.length; i++) { | |
var href = a[i].host; // set the host of each link |
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 | |
$custom_css_template['colors'] = " | |
body{color:~color_body~} | |
a, a:hover, a:visited, a:active, a:focus, | |
.single .entry-content a, | |
.single .entry-content a:hover, | |
.single .entry-content a:visited, | |
.single .entry-content a:active, | |
.single .entry-content a:focus, |
NewerOlder