Skip to content

Instantly share code, notes, and snippets.

@sid24rane
sid24rane / StackBalancedParenthesis.c
Created September 28, 2016 17:55
Balanced Parenthesis in C using stack
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#define MAX_SIZE 100
struct Stack{
int top;
char arr[MAX_SIZE];
} st;
@luismts
luismts / GitCommitBestPractices.md
Last active May 7, 2024 09:43
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@Iftimie
Iftimie / index.css
Last active May 7, 2024 09:42
Resume
/* Fonts */
/* Family */
h1 {
font-family: 'Julius Sans One', sans-serif;
}
h2 { /* Contact, Skills, Education, About me, Work Experience */
font-family: 'Archivo Narrow', sans-serif;
}
@2510
2510 / Windows 10 Disable Services.bat
Last active May 7, 2024 09:41
Disable unused services (for me) on Windows 10
REM Windows Search
sc config WSearch start=disabled
REM SSDP Discovery
sc config SSDPSRV start=disabled
REM Geolocation Service
sc config lfsvc start=disabled
REM ActiveX Installer
sc config AXInstSV start=disabled
REM AllJoyn Router Service
sc config AJRouter start=disabled
@joechrysler
joechrysler / who_is_my_mummy.sh
Last active May 7, 2024 09:40
Find the nearest parent branch of the current git branch
#!/usr/bin/env zsh
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
# How it works:
@smarr
smarr / fib.S
Created November 6, 2019 14:13
8-bit implementation of a recursive fibonacci
; Fibonacci
; executable with https://schweigi.github.io/assembler-simulator/
; Result is in register A
JMP .start
; fib(n) <- n is in register A
fib:
CMP A, 1 ; compare n to a
JE .fibReturnOne
JB .fibReturnZero
@IagoPFerreira
IagoPFerreira / Supabase-checklist.md
Last active May 7, 2024 09:39
Checklist para configurar o Supabase

Checklist de adicionar um novo projeto ao Supabase

  • Login

    • Acessou o site do Supabase
    • Clicou em sign-in/entrar para fazer o login
    • Deu permissão ao Supabase à sua conta do Github (Somente para caso seja o primeiro acesso)
  • Criando um novo projeto

    • Clicar em New Project/Novo Projeto
    • Selecionar a organização com o nome do seu usuário do GitHub
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
// https://bugzilla.mozilla.org/show_bug.cgi?id=128072#c32
// Credit: Alexander Bergmann
"use strict;"
// Toggle Replied and Forwarded
if (location == "chrome://messenger/content/messenger.xhtml") {
let toggleRepliedAndForward = {