Skip to content

Instantly share code, notes, and snippets.

View pedro-vasconcelos's full-sized avatar
💭
Coding...

Pedro Vasconcelos pedro-vasconcelos

💭
Coding...
View GitHub Profile
[alias]
#Basic
st = status -sb
co = checkout
#Flow
fs = flow feature start
ff = flow feature finish
#Infoz
@pedro-vasconcelos
pedro-vasconcelos / gist:280a12a9cc7b11b0dac3
Created May 9, 2014 11:13
Code to send e-mail with Swiftmailer and Amazon SES
require "swift-mailer-510/lib/swift_required.php";
$message = Swift_Message::newInstance()
->setCharset('utf-8')
->setSubject('Your subject')
->setFrom(array('[email protected]' => 'From Name'))
->setTo(array('[email protected]' => 'To Name'))
->setBody('Here is the message itself')
->addPart('<q>Here is the message itself</q>', 'text/html')
;
@pedro-vasconcelos
pedro-vasconcelos / gist:93dc77a89287ee848406
Created August 23, 2014 14:35
Debug XCode PHPStorm CLI
php -dxdebug.remote_enable=1 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_port=9000 -dxdebug.remote_mode=req script.php
php ezpublish/console cache:clear --ansi --no-optional-warmers --no-warmup --no-debug --env=prod
Cache warming occurs whenever you run the cache:warmup or cache:clear task (unless you pass --no-warmup to cache:clear).
It is also run when handling the request, if it wasn't done by one of the commands yet. The purpose is to initialize
any cache that will be needed by the application and prevent the first user from any significant "cache hit" where the
cache is generated dynamically.
http://symfony.com/doc/current/reference/dic_tags.html#kernel-cache-warmer
@pedro-vasconcelos
pedro-vasconcelos / clean-wordpress-head-4.6.1
Created October 4, 2016 17:06
Remove Wordpress Junk from Header
// REMOVE WP EMOJI
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
// First, we remove all the RSS feed links from wp_head using remove_action
remove_action( 'wp_head','feed_links', 2 );
@pedro-vasconcelos
pedro-vasconcelos / pedro.zsh-theme
Created February 26, 2019 23:25
Oh My Zsh Theme
if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then
ZSH_THEME_CLOUD_PREFIX='★'
fi
PROMPT='%{$fg_bold[white]%}%M %{$fg[yellow]%}$ZSH_THEME_CLOUD_PREFIX %{$fg[green]%}%p %{$fg[green]%}%c %{$fg[cyan]%}$(git_prompt_info)%{$fg[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[red]%}♡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
alias art="php artisan"
alias pu="phpunit"
alias ls='ls -lGFh'
alias xdebug='php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9003 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_connect_back=0'
alias gp='git pull origin master'
alias pull='git pull origin master'
alias push='git push origin master'
alias status='git status'
{
"Ansi 5 Color" : {
"Red Component" : 0.8849945068359375,
"Color Space" : "sRGB",
"Blue Component" : 0.72357618808746338,
"Alpha Component" : 1,
"Green Component" : 0.50704026222229004
},
"Working Directory" : "\/Users\/pedrovasconcelos",
"Prompt Before Closing 2" : false,
@pedro-vasconcelos
pedro-vasconcelos / dnsmasq OS X.md
Created November 18, 2021 10:17 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@pedro-vasconcelos
pedro-vasconcelos / setup_intent.created.json
Created April 6, 2022 17:39
stripe_event: setup_intent.created
{
"id": "evt_1KlcoILueXt1u2tdFigTg6DA",
"object": "event",
"api_version": "2020-08-27",
"created": 1649266706,
"data": {
"object": {
"id": "seti_1KlcoILueXt1u2tdYPXTRJ7t",
"object": "setup_intent",
"application": null,