Skip to content

Instantly share code, notes, and snippets.

@lmcneel
lmcneel / remove-node-modules.md
Last active April 21, 2024 19:39
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@cgrymala
cgrymala / views-custom-feed-sample.php
Last active June 23, 2019 06:02
Shows an example of the functions used to remove Views wrapper HTML
<?php
/**
* Override the extra HTML that Views uses to wrap its output
*/
remove_shortcode( 'wpv-layout-start' );
remove_shortcode( 'wpv-layout-end' );
add_shortcode( 'wpv-layout-start', array( $this, '__blank' ) );
add_shortcode( 'wpv-layout-end', array( $this, '__blank' ) );
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active December 29, 2023 00:40
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@RunnerRick
RunnerRick / ._window-focus-blur.md
Last active November 27, 2023 11:27
Demonstrates how to handle the window's `focus` and `blur` events.

Demonstrates how to handle the window's focus and blur events.

This code does not depend on any third-party libraries like jQuery.

@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active April 2, 2024 18:45
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@calebbrewer
calebbrewer / Deploy With Git
Last active October 21, 2023 07:29
Manage and deploy a website with Git. I am using Lunux CentOS for my server.
Video on this Gist: https://www.youtube.com/watch?v=zvpLDuRY4ss&feature=c4-overview&list=UUj8_147vA3FQ1quI_CjciIQ
#Initialize a bare repo on the webserver. This would preferably be outside of your public website dir but if you are on a shared host you may not have that option. I like to make a folder just outside of the live folder called git. So for me it would look like this…
$ cd /var/www
$ mkdir git && cd git
$ git init –-bare
#Now you need to create a post-receive hook that will check out the latest tree from the Git repo you just setup into the /var/www/html folder where you want your website to be. You can make this whatever folder you want your code to end up in.
#This will create a file called post-receive in the hooks dir of the git repo.