Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
kamilogorek / _screenshot.md
Last active September 18, 2024 03:05
Clutter-free VS Code Setup
image
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active January 9, 2025 06:21
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@dgoosens
dgoosens / Makefile
Last active November 10, 2023 20:10
FrankenPHP- APIPlatform Makefile
DOCKER_COMPOSE=docker compose
.DEFAULT_GOAL := help
##help: List available tasks on this project
help:
@echo ""
@echo "These are the available commands"
@echo ""
@grep -E '\#\#[a-zA-Z\.\-]+:.*$$' $(MAKEFILE_LIST) \
| tr -d '##' \
@stettix
stettix / things-i-believe.md
Last active December 5, 2024 15:29
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@shubheksha
shubheksha / brackets-pair-colorizer.md
Last active June 14, 2024 09:15
A list of extensions/plugins that highlight matching parens/braces for various editors/IDEs.
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active January 13, 2025 01:15
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Unit Tests in Vue.js

Tooling

{
  "karma-mocha": "^0.2.1",
  "karma-chai": "^0.1.0",
  "karma-chai-as-promised": "^0.1.2",
  "karma-sinon": "^1.0.4",
@Ocramius
Ocramius / find-missing-return-types.php
Last active September 5, 2018 10:27
Script to find classes/interfaces/traits with missing return types: ADD THEM TO YOUR SHIT.
<?php
require_once __DIR__ . '/vendor/autoload.php';
$namespace = 'PutYourProjectNamespaceHere\\';
foreach (new RegexIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . '/src')), '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH) as $file) {
require_once $file[0];
}
@jakzal
jakzal / FindPackageListsCommand.php
Created January 16, 2014 14:19
How to spec a Symfony2 console command?
<?php
namespace Zalas\Bundle\PackagistBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class FindPackageListsCommand extends ContainerAwareCommand
@jakelazaroff
jakelazaroff / require_module.js
Last active December 20, 2015 12:29
RequireJS module example. This is how I keep my dependency list organized!
define([
// models
'models/someModel', 'models/someOtherModel',
// collections
'collections/someCollection',
// views
'views/someView', 'views/someOtherView',
// templates
'text!templates/someTemplate.html', 'text!templates/someOtherTemplate.html',