Skip to content

Instantly share code, notes, and snippets.

Avatar
🚢
Moving tings

Raphael Stolt raphaelstolt

🚢
Moving tings
View GitHub Profile
View things-i-believe.md

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.

@shubheksha
shubheksha / brackets-pair-colorizer.md
Last active Aug 26, 2020
A list of extensions/plugins that highlight matching parens/braces for various editors/IDEs.
View Unit Testing In VueJS.md

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 Sep 5, 2018
Script to find classes/interfaces/traits with missing return types: ADD THEM TO YOUR SHIT.
View find-missing-return-types.php
<?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 Jan 16, 2014
How to spec a Symfony2 console command?
View FindPackageListsCommand.php
<?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 Dec 20, 2015
RequireJS module example. This is how I keep my dependency list organized!
View require_module.js
define([
// models
'models/someModel', 'models/someOtherModel',
// collections
'collections/someCollection',
// views
'views/someView', 'views/someOtherView',
// templates
'text!templates/someTemplate.html', 'text!templates/someOtherTemplate.html',
@igorw
igorw / import_sql.php
Last active Dec 16, 2015
Using symfony/console's ArgvInput standalone.
View import_sql.php
<?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),
@webgio
webgio / app.coffee
Last active Aug 13, 2020
Marionette.js module to manage authentication. Needs a server method that checks credentials returning true or false. Started from this blog post code: http://clintberry.com/2012/backbone-js-apps-authentication-tutorial/
View app.coffee
App = new Marionette.Application();
App.addRegions {
"headerRegion": "#header"
"topMenuRegion": "#top-menu"
"mainRegion" : "#main"
}
App.on 'initialize:after', ->
Backbone.history.start()
View array-dic.php
<?php
class Foo {
public $bar;
function __construct($bar)
{
$this->bar = $bar;
}
}
@asciidisco
asciidisco / pubsub_with_requirejs_backbone.js
Created Oct 31, 2012
PubSub with requirejs & backbone
View pubsub_with_requirejs_backbone.js
// PubSub impl. with require.js & backbone.js
// events.js
define(['underscore', 'backbone'], function (_, Backbone) {
'use strict';
var events = {};
_.extend(events, Backbone.Events);
return events;
});
You can’t perform that action at this time.