Skip to content

Instantly share code, notes, and snippets.

View maykbrito's full-sized avatar
🏠
Working from home

Mayk Brito maykbrito

🏠
Working from home
View GitHub Profile
@maykbrito
maykbrito / remember_my_words.php
Last active May 6, 2017 19:02
Memorize - remember - music lyrics, bible texts, scripts - for actors, etc
<?php
$lyric = <<<EOT
Queima um fogo intenso no meu coração
Arde um desejo forte de pregar
De contar pra todo mundo o que eu descobri
A verdade que encontrei o Deus que eu conheci
A mensagem que eu tenho, recebi
<?php
class VimeoBackground {
public function __construct(){}
public function do_shortcode()
{
add_shortcode( 'vimeobackground', array($this, 'vimeo_wrapper'));
}
<?php
/* PARA USAR COM WORDPRESS */
class BeforeAfter {
public function __construct(){}
public function do_shortcode()
{
add_action( 'wp_enqueue_scripts', array($this, 'add_scripts') );
@media (max-width: 980px) {
/*********************************
style mobile fixed header
*********************************/
#main-header.et-fixed-header {top:0 !important;}
.et_fixed_nav #main-header.et-fixed-header {
position: fixed;
background: rgba(255,255,255,0.8);
#!/usr/bin/env bash
V_DIR_SQL="/home/sysadmin/data"
V_DIR_BACKUP="/home/sysadmin/backup"
V_HOST="localhost"
V_DATABASE="database"
V_USER="root"
V_PASSWORD="root"
#!/bin/bash
#
# Commented provisioning script for a flyimg server
# Created for Ubuntu 16 but works with 14 and possibly with other distributions
# This script is intended to be used as a root user
# This script should be ideally invoqued by a Cloud-init script
# Read more at: https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting#run-arbitrary-commands-for-more-control
#
# Original Gist at: https://gist.github.com/baamenabar/2a825178318d27fc20abfe5a413b45eb
# Author B. Agustin Amenabar L. @iminabar
@maykbrito
maykbrito / add_testimonials.php
Created October 21, 2018 20:16
Script to upload images of a local folder to a wordpress server, create a Custom Post Type item, and an Attachment, to add as featured image of that CPT. We do that to help as a bulk operation to add lot of testimonials images for a client.
<?php
class addDepoimentosWithPhotosInFolder {
static $fullpath_dir;
static $files = [];
static $depoimento_section;
static $current_post_id;
static $current_attach_id;
static $current_filename;
@maykbrito
maykbrito / container.html
Created April 24, 2019 13:18
simple lazy load background image that resides inside a container
<div class="port-wrapper">
<div class="lazy-image" data-src='/image1.jpg'></div>
<div class="lazy-image" data-src='/image2.jpg'></div>
<div class="lazy-image" data-src='/image3.jpg'></div>
</div>

Ambiente Mac

Vamos configurar nosso ambiente de desenvolvimento, instalando ferramentas básicas para iniciarmos no mundo da programação.

Instalar as Ferramentas

Homebrew

Homebrew é um gerenciador de pacotes que nos ajudará a instalar os programas de maneira programática, pelo terminal do Mac.