Skip to content

Instantly share code, notes, and snippets.

View edheltzel's full-sized avatar
🇺🇸
Just your average run-of-the-mill kinda guy

Mr edheltzel

🇺🇸
Just your average run-of-the-mill kinda guy
View GitHub Profile
@edheltzel
edheltzel / untrack_files_already_added_to_git.md
Last active October 31, 2019 23:36
Untrack files already added to git repo

Step 1 - Commit all changes

Make sure all changes are commited including the .gitignore

Step 2 - Remove everything from the repo

To clear the repo, use: git rm -r --cached .

  • rm is the remove command
  • -r will allow recursive removal
@trey8611
trey8611 / import-optimizations.md
Last active July 1, 2024 03:41
WP All Import - Optimize your import speed.
@lukecav
lukecav / functions.php
Created January 10, 2018 03:22
Disable Elementor overview dashboard widget in WordPress
function disable_elementor_dashboard_overview_widget() {
remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'disable_elementor_dashboard_overview_widget', 40);
@natecavanaugh
natecavanaugh / Lexicon Icon Design Guidelines.md
Last active November 6, 2019 19:09
The Lexicon icon design process and guidelines for designers and developers

Lexicon Icon Design Guidelines

Note: These guidelines do not apply to the Language Flag Icons, which should have their own guidelines

Reasoning

The rules below are mainly there for a few reasons:

  1. To make it easier to communicate to developers what an icon's purpose and naming should be
  2. To make it easier for Liferay's theme developers to be able to customize the look and feel of the icon set from a theme
  3. To make sure that the icons delivered are as fast to load and cruft-free as possible
@edheltzel
edheltzel / cloudSettings
Last active September 3, 2020 01:08
Visual Studio Code Sync Settings GIST
{"lastUpload":"2020-09-03T01:08:39.942Z","extensionVersion":"v3.4.3"}
@konstantin-morenko
konstantin-morenko / list-categories-count.liquid
Last active January 21, 2021 14:49 — forked from Phlow/list-categories-count.liquid
Jekyll: List all categories with according post count and show and link all post items listed in the according category
<h2>Categories</h2>
<ul>
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="#{{ category }}">{{ category | capitalize }} ({{ site.tags[category].size }})</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="#{{ tag[0] }}">{{ category[0] | capitalize }} ({{ category[1].size }})</a></li>
@remarkablemark
remarkablemark / Dockerfile
Last active September 2, 2024 23:57
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
@dfrankland
dfrankland / resize.fish
Last active February 15, 2021 21:42 — forked from gingertom/resizer.sh
Simple `imagemagick` fish shell script to convert all @2x images in a directory to @1x. Place file in `~/.config/fish/functions/`, then run like normal: `resize`!
function resize --description "Resize images from @2x to @1x in current directory."
for image in *
echo $image | grep -qE '.*@2x.*'; and \
convert $image -resize 50% (echo $image | sed "s/@2x/@1x/g")
end
end
@edheltzel
edheltzel / git-selective-merge.md
Created February 23, 2016 16:44 — forked from katylava/git-selective-merge.md
git selective merge

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp
@edheltzel
edheltzel / functions.php
Created February 12, 2016 18:43
Create Duplicates - adds a duplication button to the dashboard for pages, posts and custom post types. Just add this to your functions.php file.
<?php
// Function creates post duplicate as a draft and redirects then to the edit post screen
function rdm_duplicate_post_as_draft(){
global $wpdb;
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rdm_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) {
wp_die('No post to duplicate has been supplied!');
}
// get the original post id