Skip to content

Instantly share code, notes, and snippets.

View felipemfp's full-sized avatar

Felipe Pontes felipemfp

View GitHub Profile
{"id":36045, "pdf": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9Db2xvclNwYWNlL0RldmljZUdyYXkvU3VidHlwZS9JbWFnZS9IZWlnaHQgOTQvRmlsdGVyL0ZsYXRlRGVjb2RlL1R5cGUvWE9iamVjdC9XaWR0aCAyNTcvTGVuZ3RoIDQ2L0JpdHNQZXJDb21wb25lbnQgOD4+c3RyZWFtCnic7cExAQAAAMKg/qlnDQ+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4N/y6BSUKZW5kc3RyZWFtCmVuZG9iagozIDAgb2JqCjw8L0NvbG9yU3BhY2VbL0NhbFJHQjw8L0dhbW1hWzIuMiAyLjIgMi4yXS9XaGl0ZVBvaW50WzAuOTUwNDMgMSAxLjA5XS9NYXRyaXhbMC40MTIzOSAwLjIxMjY0IDAuMDE5MzMgMC4zNTc1OCAwLjcxNTE3IDAuMTE5MTkgMC4xODA0NSAwLjA3MjE4IDAuOTUwNF0+Pl0vSW50ZW50L1BlcmNlcHR1YWwvU3VidHlwZS9JbWFnZS9IZWlnaHQgOTQvRmlsdGVyL0ZsYXRlRGVjb2RlL1R5cGUvWE9iamVjdC9XaWR0aCAyNTcvU01hc2sgMiAwIFIvTGVuZ3RoIDExMDQ1L0JpdHNQZXJDb21wb25lbnQgOD4+c3RyZWFtCnic7V0HWBVH1x5EwIKCgBRFRFFTTK9fypdirPTem4i9l9hibIma2KOxo/SO2Gg2BAsoggIiUqT33nv7z+xe7t27d+/lIhrN9+/7zKOX2dnZmdl555wzc2a2p4cFCxYsWLBgwYIFCxYsWLBgwYIFCxYsWLBgwYIFCxYsWLBgwYIFCxYsxEb36y4ACxYsWLB4PcACYOnZTc9Lsl93SViweD14kJGAdCSRtdrrLggLFq8HyHjk4LkTkI3qh+unve6ysGDxT2Pymm+Q3ViZeZOk501CJiO3+O4holnzmMX/C2zw+Q2ZykH/JwNmga5kcu5Tce5
@joseluisq
joseluisq / 1README.md
Last active January 3, 2022 13:22
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

Lumen 5 HTTP Exception Handlers with JSON support.

Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

image

Setup

Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php and app/Http/Middleware/Authenticate.php

@PurpleBooth
PurpleBooth / README-Template.md
Last active June 25, 2024 09:23
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

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@cobyism
cobyism / gh-pages-deploy.md
Last active June 26, 2024 23:06
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 27, 2024 14:41
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'