Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View marlonassuncao's full-sized avatar

Marlon Assunção marlonassuncao

View GitHub Profile
@marlonassuncao
marlonassuncao / my_config.sh
Last active December 11, 2015 17:37
My development settings on mac.
# Intall Homebrew
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Alias to open files by SublimeText
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
# Instalar Git, PHP 5.6, Composer, Mcrypt
brew install git
brew tap homebrew/dupes
@marlonassuncao
marlonassuncao / change_root.sh
Last active August 29, 2015 14:10
Change domain root folder on cPanel.
# Open config by user.
sudo nano /var/cpanel/userdata/USERNAME/DOMAINNAME.COM
# Change root directory.
documentroot: /home/USERNAME/public_html/NEW_PATH
# Rebuild and restart server.
/scripts/rebuildhttpdconf
service httpd restart
@marlonassuncao
marlonassuncao / permission_user.sh
Last active August 29, 2015 14:13
Give permission to a cpanel ftp user.
sudo chown -R user:user /folder/*
@marlonassuncao
marlonassuncao / update_wordpress.sql
Last active September 19, 2019 20:40
Update tables for wordpress.
UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, '', '');
UPDATE wp_posts SET post_content = replace(post_content, '', '');
UPDATE wp_postmeta SET meta_value = replace(meta_value, '', '');
UPDATE wp_revslider_sliders SET params = REPLACE(params, 'https:\\/\\/vps02.nawe.com.br\\/tests\\/preall\\/', 'https:\\/\\/www.preall.com.br\\/');
UPDATE wp_revslider_slides SET layers = REPLACE(layers, 'https:\\/\\/vps02.nawe.com.br\\/tests\\/preall\\/', 'https:\\/\\/www.preall.com.br\\/');
@marlonassuncao
marlonassuncao / remove_homebrew.sh
Last active August 29, 2015 14:17
Remove homebrew completely.
cd `brew --prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
@marlonassuncao
marlonassuncao / clearfix.styl
Last active August 29, 2015 14:17
Stylus clearfix hack.
clearfix()
*zoom 1
&:before
&:after
content ''
display table
&:after
clear both
@marlonassuncao
marlonassuncao / zip.sh
Created April 2, 2015 14:36
Compress all folder to .zip on linux.
zip -r myfiles.zip myfiles
@marlonassuncao
marlonassuncao / .zshrc
Last active December 13, 2015 11:11
My .zshrc config.
# Path to your oh-my-zsh installation.
export ZSH=/Users/marlonassuncao/.oh-my-zsh
ZSH_THEME="gianu"
plugins=(git)
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
source $ZSH/oh-my-zsh.sh
@marlonassuncao
marlonassuncao / Preferences.sublime-settings
Last active February 24, 2016 13:27
Subilme settings.
{
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"theme": "Material-Theme-Darker.sublime-theme"
}
@marlonassuncao
marlonassuncao / sendMail.php
Created June 19, 2015 16:47
Sendmail SMTP with class PHPmailer.
<?php
require 'vendor/PHPMailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
// $mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication