Skip to content

Instantly share code, notes, and snippets.

View jfeliweb's full-sized avatar
🖖
Love, Peace and Happiness

Jean Felisme jfeliweb

🖖
Love, Peace and Happiness
View GitHub Profile
@jfeliweb
jfeliweb / acf_in_custum_plugin.php
Last active June 23, 2021 17:44
Add ACF inside of your plugin
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/*found: https://support.advancedcustomfields.com/forums/topic/include-acf-to-my-plugin/*/
/** Start: Detect ACF Pro plugin. Include if not present. */
if ( !class_exists('acf') ) { // if ACF Pro plugin does not currently exist
/** Start: Customize ACF path */
add_filter('acf/settings/path', 'cysp_acf_settings_path');
function cysp_acf_settings_path( $path ) {
$path = plugin_dir_path( __FILE__ ) . 'acf/';
return $path;
}
@bradtraversy
bradtraversy / devcamper_specs.md
Last active July 12, 2024 01:33
Specs for Devcamper Udemy course project

DevCamper Backend API Specifications

Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.

Bootcamps

  • List all bootcamps in the database
    • Pagination
    • Select specific fields in result
    • Limit number of results
  • Filter by fields
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 22, 2024 05:09
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@jfeliweb
jfeliweb / repo-reset.md
Created July 18, 2019 15:22 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@jfeliweb
jfeliweb / Docker
Created April 21, 2019 03:23
Node JS and MongoDB in Docker
FROM node:latest
RUN mkdir /app
WORKDIR /app
COPY package.json package.json
RUN npm install
COPY . .
EXPOSE 3000
RUN npm install -g nodemon
CMD [ "nodemon", "app.js"]
@bradtraversy
bradtraversy / docker_wordpress.md
Last active July 21, 2024 05:00
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@jfeliweb
jfeliweb / cloudSettings
Created December 31, 2018 14:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-12-31T14:26:48.256Z","extensionVersion":"v3.2.4"}
@bradtraversy
bradtraversy / docker-help.md
Last active July 9, 2024 10:18
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@jakebellacera
jakebellacera / bootstrap-4-menu-wordpress-filters.md
Last active October 18, 2022 21:20
Bootstrap 4 menus in WordPress via filters. No walker needed!

Bootstrap 4 menus in WordPress with filters

No walker needed!

This snippet allows you to create Bootstrap 4 menus without the use of a Walker. Instead, we're using filters to leverage WordPress core functionality as much as possible. Basically, all you need to do is this and you're done:

<nav class="navbar navbar-expand-lg fixed-top">
  <div class="container">
    <a class="navbar-brand" href="<?php echo home_url(); ?>">