Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Learning Node.js deeply

Niels Lange nielslange

👨‍💻
Learning Node.js deeply
Block or report user

Report or block nielslange

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View style.css
/* Replace site logo based on language | NL-***-hc */
html[lang="en-US"] .custom-logo-link {
background: url(IMAGE-URL);
height: 150px;
width: 300px;
display: block;
margin: auto;
}
html[lang="en-US"] .custom-logo-link img.custom-logo {
display: none;
@nielslange
nielslange / stats.js
Last active Sep 24, 2019
Fetch total downloads and installs of all WordPress plugins
View stats.js
let url = 'https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[search]=SMNTCS';
let downloads = 0;
let installs = 0;
let plugins;
let plugin;
fetch( url )
.then( response => {
return response.json()
} )
View Adjust post title visibility
/* Adjust post title visibility */
.headline {
display: none;
}
View style.css
/* Adjust post title font color */
.headline {
color: #fff;
}
View style.css
/* Adjust post title font size */
.headline {
font-size: 32px;
}
View style.css
/* Adjust site title font size */
.site-title {
font-size: 72px;
}
@nielslange
nielslange / .htaccess
Created Apr 25, 2019
Redirect www to non-www
View .htaccess
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
View style.css
/* Hide actionbar | NL-12062516-hc */
div#actionbar,
.site-info {
display: none;
}
@nielslange
nielslange / .bash
Created Apr 6, 2019
Regenerate images using WP-CLI
View .bash
wp media regenerate --yes
@nielslange
nielslange / .bash
Created Apr 6, 2019
Regenerate images using WP-CLI
View .bash
wp media regenerate --image_size=course_archive_thumbnail --yes
wp media regenerate --image_size=course_single_thumbnail --yes
wp media regenerate --image_size=lesson_archive_thumbnail --yes
wp media regenerate --image_size=lesson_single_thumbnail --yes
wp media regenerate --image_size=portfolio_horizontal --yes
wp media regenerate --image_size=portfolio_slider --yes
wp media regenerate --image_size=portfolio_vertical --yes
wp media regenerate --image_size=shop_catalog --yes
wp media regenerate --image_size=shop_thumbnail --yes
wp media regenerate --image_size=woocommerce_gallery_thumbnail --yes
You can’t perform that action at this time.