Skip to content

Instantly share code, notes, and snippets.

View raphaelstolt's full-sized avatar
:octocat:
Focusing.

Raphael Stolt raphaelstolt

:octocat:
Focusing.
View GitHub Profile
@igorw
igorw / import_sql.php
Last active December 16, 2015 12:29
Using symfony/console's ArgvInput standalone.
<?php
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
$input = new ArgvInput($argv, new InputDefinition([
new InputArgument('sql', InputArgument::REQUIRED),
new InputOption('update', 'u', InputOption::VALUE_NONE),
@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',
@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
@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];
}

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",
@shubheksha
shubheksha / brackets-pair-colorizer.md
Last active May 1, 2023 18:05
A list of extensions/plugins that highlight matching parens/braces for various editors/IDEs.
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
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. See also my blog at www.janvsmachine.net.

Fundamentals

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

@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 '##' \
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active April 22, 2024 16:22
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:

@kamilogorek
kamilogorek / _screenshot.md
Last active May 2, 2024 13:48
Clutter-free VS Code Setup
image