Skip to content

Instantly share code, notes, and snippets.

View thulioph's full-sized avatar
🔥

Thulio Philipe thulioph

🔥
View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 3, 2024 20:51
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 18:53
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

@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@millermedeiros
millermedeiros / osx_setup.md
Last active May 1, 2024 20:46
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active April 25, 2024 22:55
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@sgnl
sgnl / postgres-brew.md
Last active April 21, 2024 23:18
Installing Postgres via Brew (OSX) (outdated see top most note)

Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.

new out put may look like

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55 will be the first on the list, already selected:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS

@felisio
felisio / array_iteration_thoughts_pt-BR.md
Last active March 10, 2024 12:37 — forked from ljharb/array_iteration_thoughts.md
Métodos de iteração de Array

Métodos de iteração de Array

Adaptação do fork: (https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff)

Ao tentar explicar como o Javascript usa seu métodos para arrays, acabei reunindo esses conceitos. Espero que Seja util. Ficarei feliz com qualquer sugestão.

Introdução

O Objet Array no Javascript tem muitos métodos construidos no seu prototype. Alguns deles modificam o proprio array passado. Felizmente, a maioria não, eles retonar um novo array inteiramente distinto. Uma vez que arrays são conceitualmente uma lista de itens, ajuda na clareza do código e sua manutenção a ponto de ser capas de operar de uma forma mais "funcional" . (Eu insisto em refrenciar um array como uma "Lista" - embora em algumas linguaguens de programação, Lista é um tipo de dado nativo, mais em JS e nesse POST, estou me referindo ao conceito. Em todos os lugares que eu usar a palavra "lista" você pode assumir que eu estou falando de JS Array) Isso siginifica, para a execução de uma simples operação na Lista como um

@jedfoster
jedfoster / SassMeister-input.scss
Last active March 1, 2024 10:29
JavaScript version of Sass' mix() function
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
body {
width: 100%;
height: 10em;
background: mix(#ff0000, #0000bb, 75);
}