Skip to content

Instantly share code, notes, and snippets.

View WesleyGoncalves's full-sized avatar
💾
in the Tz 101

Wesley Gonçalves WesleyGoncalves

💾
in the Tz 101
View GitHub Profile
@WesleyGoncalves
WesleyGoncalves / git-pre-commit
Last active January 27, 2021 16:07
This is a Git pre-commit script to automatically add a MySQL database backup in the commit
#!/bin/sh
echo "#############################################################################"
echo "# Git Pre-Commit hook #"
echo "# This is a pre-commit Git hook to update a WordPress deployment #"
echo "# Created by Wesley Gonçalves <dev@wesleygoncalves.com> #"
echo "# https://gist.github.com/WesleyGoncalves/fc9657bf77bf8162ba84a4d47dfed0a6 #"
echo "# version: 1.0.0 #"
echo "#############################################################################"
ROOT=.
@WesleyGoncalves
WesleyGoncalves / testGetPropertiesFromClass.php
Last active May 22, 2020 19:01
Test getting properties/attributes from object/class in PHP.
<?php
/**
* Test getting properties/attributes from object/class.
*
* It considers the following characteristics:
* visibility: public, protected, private
* abstraction: "normal", static, magic
* default value: with or without initial value
* updated value: whether or not its initial value is changed
@WesleyGoncalves
WesleyGoncalves / .gitignore
Last active July 12, 2024 00:18
.gitignore file
# OS and IDEs
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
$RECYCLE.BIN/
*.code-workspace
*.sublime-project
*.sublime-workspace
/.idea
/.vscode
@WesleyGoncalves
WesleyGoncalves / readmegen.yml
Last active June 4, 2020 02:38
A configuration file to generate a *developer* changelog file using *fojuth/readmegen* API
vsc: git
format: md
issue_tracker_pattern: https://github.com/<user-name>/<repo-name>/issues/
break: "# CHANGELOG"
output_file_name: "CHANGELOG.md"
message_groups:
Features:
- feat
Fixed:
- fix
@WesleyGoncalves
WesleyGoncalves / README-Template.md
Created June 24, 2019 19:27 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@WesleyGoncalves
WesleyGoncalves / .git-commit-template
Last active February 20, 2020 00:01 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>[(optional scope)]: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@WesleyGoncalves
WesleyGoncalves / settings.json
Last active June 4, 2019 14:46
VS Code settings
/**
* Visual Studio Code settings.json file
* Reference: https://code.visualstudio.com/docs/getstarted/settings
*
* You can download this file
* directly to your project from the command-line
* curl -O https://gist.githubusercontent.com/WesleyGoncalves/4369bcbc8dd2075f482d08695e8cad90/raw/settings.json
*
* SOME OTHER OPTIONS:
* # Interface
@WesleyGoncalves
WesleyGoncalves / .editorconfig
Last active July 25, 2024 09:51
EditorConfig file for web dev (front-end and PHP)
# EditorConfig is awesome: http://EditorConfig.org
# 1st version comes from a Gist by @avandrevitor [here](https://gist.github.com/avandrevitor/b917770334af3a43cf8c489f93287a84)
#
# Extended version is available in [WesleyGoncalves' GitHub Gist](https://gist.githubusercontent.com/WesleyGoncalves/ae64d95f663a15d8df455d1f0e5f7687)
#
# Be aware that:
# > Comments should go in individual lines, **we are not sure whether appending comments may cause issues**.
# Emphasis added. [link](https://github.com/editorconfig/editorconfig/wiki/Syntax)
#
#
@WesleyGoncalves
WesleyGoncalves / datatype_sizes.c
Last active June 1, 2019 13:28
Sizes of data types and pointers in C
/**
* Sizes of data types and pointers in C
* \author Wesley Gonçalves (@wesleygoncalves)
*
* You can download this file
* directly to your project from the command-line
* curl -O https://gist.githubusercontent.com/WesleyGoncalves/b914272d146917db37c6937cc2643064/raw/894f67d5e98083281d87a7880da7d04455b2105f/datatype_sizes.c
*/
#include <stdio.h>