Skip to content

Instantly share code, notes, and snippets.

View fabolivark's full-sized avatar

Fabian Altahona fabolivark

View GitHub Profile
@fabolivark
fabolivark / mysql-docker.sh
Last active May 25, 2022 03:15 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
#Masive Backup
for docker in $(docker ps |grep mysql|awk '{print$1}'); do docker exec $docker sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"'> /root/dumpsmysql/"$(date '+%d%m%Y')"-$docker; done
@fabolivark
fabolivark / deactivate-plugins-wpe-staging.php
Created March 13, 2020 19:09 — forked from subharanjanm/deactivate-plugins-wpe-staging.php
Deactivate certain plugins in the development/staging environment of WP Engine
<?php
/*
Plugin Name: Deactivate Certain Plugins - WPEngine Staging
Plugin URI: https://gist.github.com/subharanjanm/4272d25a446fb2ca12a549a4a5662633
Description: Deactivate certain plugins in the development/staging environment of WP Engine.
Version: 1.0
Author: Subharanjan
Author URI: https://gist.github.com/subharanjanm/4272d25a446fb2ca12a549a4a5662633
License: GPLv2
*/
@fabolivark
fabolivark / Git push deployment in 7 easy steps.md
Created June 30, 2017 02:16 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@fabolivark
fabolivark / git-deployment.md
Created June 24, 2017 16:59 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@fabolivark
fabolivark / ACF_Layout.php
Created February 28, 2017 03:22 — forked from beaucharman/ACF_Layout.php
Logical layout automation for Advanced Custom Fields and it's Flexible Content Field add on. http://www.advancedcustomfields.com/ http://www.advancedcustomfields.com/add-ons/flexible-content-field/
<?php
/**
* ACF Layout
* @version 1.0 | November 12th 2013
* @author Beau Charman | http://twitter.com/beaucharman
* @link https://gist.github.com/beaucharman/7181406
* @license MIT license
*
* Logical layout automation for Advanced Custom Fields and it's Flexible Content Field add on.
@fabolivark
fabolivark / simple-json-api.php
Created February 16, 2017 01:42 — forked from daggerhart/simple-json-api.php
Simple Read-Only JSON API example for WordPress
<?php
/**
* Class Simple_Json_Api
*/
class Simple_Json_Api {
/**
* The top level argument for the endpoint.
* ex http://example.com/myjson/post/1
@fabolivark
fabolivark / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Basic Checklist

Development

  1. Setup your icloud account (if any)
  2. Instalar chrome
  3. instalar dropbox
  4. instalar onepassword
  5. Bajar xcode
  6. instalar iterm2
<ul>
<?php $temp_query = $wp_query; query_posts('showposts=2&orderby=ASC&cat=8'); ?>
<?php while (have_posts()) { the_post(); ?>
<li>
<a class="news_title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to &ldquo;<?php the_title(); ?>&rdquo;">
<?php the_title(); ?></a>
<div class="news_content">
<span class="news_date">Publicado el: <?php the_time('M') ?>. <?php the_time('j') ?> de <?php the_time('Y')?></span>
<p><?php html5wp_excerpt('html5wp_index'); ?></p>
</div>