Skip to content

Instantly share code, notes, and snippets.

View alexmigf's full-sized avatar

Alexandre Faustino alexmigf

View GitHub Profile
@alexmigf
alexmigf / git_submodules.md
Last active December 24, 2020 11:06 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
check if exist
/dev/anbox-binder
if it doesn't, anbox-binder don't work
sudo apt install anbox-ubuntu-touch
sudo wget -q --show-progress -O /home/phablet/anbox-data/android.img http://cdimage.ubports.com/anbox-images/android-armhf-64binder.img
touch /home/phablet/anbox-data/.enable
chmod -R o+wrx /home/phablet/anbox-data/data
@alexmigf
alexmigf / gist:0c134704712fbfbcd8398cbdf9f29f6a
Created December 22, 2020 21:14 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@alexmigf
alexmigf / custom_config.inc
Created September 16, 2020 21:05 — forked from centminmod/custom_config.inc
Custom Config options available for Centminmod.
# CENTMINMOD CUSTOM CONFIGURATIONS OPTIONS FILE
# PLEASE NOTE: This file serves as a file with all the possible options, NOT what should be used in a production enviornment!!!!
# https://centminmod.com
# Creating a custom_config.inc file it will override default setting for upgrades and software installs.
# Location: /etc/centminmod/custom_config.inc
EMAIL='' # Server notification email address enter only 1 address
PUSHOVER_EMAIL='' # Signup pushover.net push email notifications to mobile & tablets
CMGIT='https://github.com/centminmod/centminmod.git'
@alexmigf
alexmigf / oop-plugin-basic.php
Created December 27, 2019 00:42 — forked from johnregan3/oop-plugin-basic.php
Basic Demonstration of Using OOP in a WordPress Plugin
/*
* Plugin Header...
*
* Note: This particular block of code won't actually run because it doesn't have
* the details of the register_post_type and register_taxonomy functions filled in.
*/
class JR3_Books {
/**
@alexmigf
alexmigf / Contributing.md
Created December 10, 2019 15:01 — forked from MarcDiethelm/Contributing.md
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@alexmigf
alexmigf / gist:849ccecad6678a0f14b58d83ccadf8d3
Created March 28, 2018 11:06
Add Checkbox to Join Newsletter on WordPress Registration Form
//
// Part 2: E-mail list MAGIC
//
//
// A. Checkbox to join list on registration form
//
add_action( 'register_form', 'ac_email_opt_in' );
function ac_email_opt_in() { ?>
@alexmigf
alexmigf / fast-firefox
Last active April 10, 2017 08:12 — forked from amorgner/fast-firefox
Some config options to make Firefox faster (updated)
Over time, I collected some options to make Firefox really fast.
WARNING! NO WARRANTY, use on your own risk!
If you know what you're doing, go to 'about:config' and edit the listed values accordingly.
Hint: Double-click boolean values to toggle true/false.
###########################
If mouse-wheel scrolling is slow, try
@alexmigf
alexmigf / wp-query-ref.php
Created March 8, 2017 12:50 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@alexmigf
alexmigf / wp-no-category-base.php
Created July 10, 2016 00:16 — forked from fjaguero/wp-no-category-base.php
Wordpress: No Category Base
<?php /*
WP No Category Base
*/
// Refresh rules on activation/deactivation/category changes
register_activation_hook(__FILE__, 'no_category_base_refresh_rules');
add_action('created_category', 'no_category_base_refresh_rules');
add_action('edited_category', 'no_category_base_refresh_rules');
add_action('delete_category', 'no_category_base_refresh_rules');
function no_category_base_refresh_rules() {