Skip to content

Instantly share code, notes, and snippets.

View dnovais's full-sized avatar
🏠
Working from home

Diego Novais dnovais

🏠
Working from home
View GitHub Profile
@serradura
serradura / oop.rb
Last active February 10, 2023 14:18
Código produzido na live "A verdadeira Orientação a Objetos" em 09/02/2023
####################################
# Pilares da Orientação a Objetos: #
####################################
# 👍 Abstração. | >
# 👍 Encapsulamento | > > Composição 🙌
# 👍 Polimorfismo | >
# 👎 Herança

Gem commands cheatsheet.md

gem list - List all gems installed

gem list -i <gem_name> - It shows if a gem exists or not. The output is true or false

gem list <gem_name> - It shows the gem version Example: gem list zlib

gem which - It shows the gem path

@wgirhad
wgirhad / bash_to_zsh_history.sh
Last active July 9, 2024 17:28
Import bash history to zsh history
cat ~/.bash_history | awk '{print ": '`date +%s`':0;" $0}' >> ~/.zsh_history
@ibraheem4
ibraheem4 / postgres-brew.md
Last active April 19, 2025 14:27 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@baweaver
baweaver / ruby_books.md
Last active April 11, 2025 11:21
A list of books for learning and expanding on your Ruby knowledge.

Ruby Book List

Learning Ruby

You're taking your first steps into Ruby

A good introduction to programming in general. Easy on newer programmers.

<?php
define('HOST', 'www.site.com.br');
$hostname = 'imap.' . HOST;
$username = 'catch@' . HOST;
$password = '**************';
$options = array("port" => 143, "settings" => array("notls"), "tagged" => "INBOX");
$imap = new Imap($hostname, $username, $password, $options);
@rdeavila
rdeavila / git-update-fork.sh
Last active March 10, 2025 23:52
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream