Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Juan Pedro Pérez Alcántara malkab

💭
I may be slow to respond.
View GitHub Profile
View macos_stuff.md

MacOS Stuff

Some MacOS stuff.

Keys Shortcuts

Keys shortcuts:

Shortcut | Function

View linux.md

Key Apps in Ubuntu

Key apps to consider when using Ubuntu:

  • gthumb: image viewer.
View github_stuff.md

Gist Recipes

Search your own Gist:

user:malkab ssh

GitHub Pages

@malkab
malkab / postgresql_config_templates.md
Last active Mar 25, 2021
PostgreSQL Config Templates
View postgresql_config_templates.md

A Couple of PostgreSQL Config Templates for Dev and Production Settings

Dev

max_connections=4000
shared_buffers=14GB
effective_cache_size=40GB
maintenance_work_mem=2GB
View google_services_recipes.md

Google Services Recipes

Gmail

Find emails without tags: use -has:userlabels

@malkab
malkab / gdal_ogr_recipes.md
Last active Mar 15, 2021
GDAL / OGR Recipes
View gdal_ogr_recipes.md

Some Useful Recipes for ETL with GDAL/OGR

PostgreSQL to GeoPackage

PGCLIENTENCODING=UTF-8 ogr2ogr \
  -f GPKG geopackage_file_name.gpkg \
  PG:"host=host user=user dbname=db password=password port=port" \
  "pg_schema.pg_table_to_export" \
  -a_srs EPSG:4326
@malkab
malkab / information_management_cheatsheet.md
Last active Feb 28, 2021
Information Management Cheatsheet
View information_management_cheatsheet.md

Information Management Cheatsheet

Some stuff about organization, that terrible issue in my life.

Bookmarking

Use Firefox for bookmarking:

Shortcut Function
View psql_cheatsheet.md

psql Cheatsheet

Cheatsheet for psql, the command line client for PostgreSQL.

Launch

Do:

@malkab
malkab / git_working_with_branches.md
Last active Feb 17, 2021
Git - Working with branches
View git_working_with_branches.md

Comparing Branches

First, the term working tree refers to the current checked out branch, the working directory in it's present state.

It is recommended that comparison are made on commited, clean states, and not on uncommited changes. To compare with the current uncommited state of the working tree move the changes to staged. If not, new files won't show up at the SEARCH & COMPARE dialog, but this is tricky.

Use the VSC Git extension. To evaluate if a stalled branch is worth to be maintained, check out the develop, master, or main branch. If not very sure of the result, create a merge test branch.

Right click on the stalled branch and select Compare with Working Tree. The SEARCH & COMPARE section will read Compating XXX to Working Tree, being XXX the right clicked branch. The interpretation of the output is based on the changes to be done to XXX to reach the state of WT. Therefore:

View docker_recipes.md

Docker Recipes

Some Docker recipes.

GitLab and Docker Registry Tokens

GitLab provides access tokens at various access levels, like API or Read Registry ones. To use them: