Skip to content

Instantly share code, notes, and snippets.

View raquelbromao's full-sized avatar
🎯
Focusing

Raquel Barbosa Romão raquelbromao

🎯
Focusing
  • Grupo Boticário
  • Porto, Portugal
  • 14:28 (UTC +01:00)
View GitHub Profile
const options = { year: "numeric", month: "long", day: "numeric" };
const date = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z
console.log(date.toLocaleDateString("pt-br", options))
// 31 de dezembro de 2020
console.log(date.toLocaleDateString("pt-br", { ...options, month: 'numeric'}))
// 31/12/2020
const regex = /^([0-9]{4})[-](0[1-9]|1[0-2])[-](0[0-9]|1[0-9]|2[0-9]|3[0-1])/gm
const dateRx = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z
@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active March 31, 2025 10:19
Stardew Valley mod recommendations

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/macOS/Windows. See the player's guide to using mods if you're interested.

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • AutoGate
    Gates open automatically when you approach and close behind you.

  • Better Sprinklers Plus
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

@bsouza
bsouza / Mips - Ler e imprimir inteiro
Created November 18, 2012 15:32
Programinha simples em Assembly Mips para ler e imprimir um inteiro vindo do teclado. O registrador $t7 foi utilizado como convenção entre a chamada das funções para que possa ser reutilizado em outros programas.
.text
.globl inicio
inicio:
jal le_inteiro_do_teclado # chama função para ler
la $t7, 0($v0) # carrega o inteiro lido em $t7
jal imprime_inteiro # manda imprimir o numero lido
j fim # encerra o programa
@rylan
rylan / EclipseJavaProjects.java
Created February 14, 2012 21:05
Get a list of all java projects open in an Eclipse workspace
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
public class EclipseJavaProjects {
public static List<IJavaProject> getJavaProjects() {
List<IJavaProject> projectList = new LinkedList<IJavaProject>();