Skip to content

Instantly share code, notes, and snippets.

@jesugmz
jesugmz / phpstorm-with-phalcon-support.md
Created April 19, 2017 22:26
PhpStorm with Phalcon support
  1. Install Phalcon Developer Tools
  2. From PhpStorm browse to View > Tool Windows > Project
  3. From the contextual menu of External Libraries click on Configure PHP Include Paths...
  4. Under the Include Path area click to add the path to phalcon/devtools/ide
@jesugmz
jesugmz / change-linux-distribution-information.md
Last active June 4, 2018 19:11
Change Linux distribution information

Especially useful for Ubuntu derivatives.

In order to change some Linux distribution information modify /etc/lsb-release file.

An example:

DISTRIB_ID="elementary"
DISTRIB_RELEASE=0.4
DISTRIB_CODENAME=loki
@jesugmz
jesugmz / phpstorm-configuration.png
Last active August 9, 2019 00:28
Configure Xdebug in PhpStorm using Docker Compose
phpstorm-configuration.png
@jesugmz
jesugmz / wireshark-tips.md
Last active August 19, 2018 17:17
Wireshark tips

Wireshark tips

HTTP packets that contains a string

http.host contains "<STRING_TO_FILTER_BY>"

Grant permissions to non-root users to allow them to read dumpcap through Wireshark

  1. usermod -a -G wireshark ${USER}
  2. chgrp wireshark /usr/bin/dumpcap
@jesugmz
jesugmz / json-naming-convention.md
Last active August 19, 2018 17:49
JSON naming convention

JSON naming convention

The convention

There are not a defined naming convention for JSON files. It was created as data interchange between all programming languages (see Introduction section of ECMA-404 The JSON Data Interchange Standard) so its naming should be easy for that purpose. That means, it could be different depending of the languages involved in the interchange of the JSON file because they can use different conventions for data naming.

The performance

I would like to do a proof of concept to compare a possible size improvement using camelCase.

Consider the samples below being UTF-8 the character encoding.

@jesugmz
jesugmz / initial-server-set-up-debian-8.md
Last active September 19, 2020 18:43
Initial server set up Debian 8, 9 and 10

Login as root

ssh root@<SERVER_IP>

Update packages

apt update && apt upgrade -y && apt install -y sudo

@jesugmz
jesugmz / Python-docstring-restructuredtext-style.rst
Last active April 24, 2024 14:34
Python docstring reStructuredText style

Python docstring reStructuredText style

Python Signatures

Signatures of functions, methods and class constructors can be given like they would be written in Python.

@jesugmz
jesugmz / filter-items-google-maps-boundary-mysql.md
Last active July 14, 2021 02:23
Filter items that belongs to a Google Maps boundary with MySQL 5.7

Filter items that belongs to a Google Maps boundary with MySQL 5.7

Having MySQL >5.7 with a table that contains a column type POINT named location and the following Google Maps response:

"geometry": {
    "bounds": {
        "northeast": {
            "lat": 40.5638447,
 "lng": -3.5249115