Skip to content

Instantly share code, notes, and snippets.


Ole Rößner Basster

View GitHub Profile
View emptyness-dependency-free.js
export default class Emptyness {
constructor(editor) {
this.editor = editor;
init() {
const doc = this.editor.model.document;
const view = this.editor.ui.view.editable;
Basster / Collection.php
Last active Nov 8, 2018
Generate Collection and CollectionIterator for a PHP class. Inspired by
View Collection.php
<?php declare(strict_types=1);
#parse("PHP File Header.php")
namespace ${NAMESPACE};
final class ${CLASS}Collection implements \Countable, \IteratorAggregate
* @var ${CLASS}[]

Keybase proof

I hereby claim:

  • I am basster on github.
  • I am basster ( on keybase.
  • I have a public key ASC9l5dwdWe8x45y7Q9e-W9pVd05iUvu349qthvp11hNqQo

To claim this, I am signing this object:

Basster /
Created Jan 24, 2018
Running Cockpit Kubernetes Edition as Docker Container
# usage: start|stop
if [ "$1" = "start" ]; then
docker run -p 9090:9090 -e KUBERNETES_SERVICE_HOST=<kubernetes-cluster-ip> -e KUBERNETES_INSECURE=true -d cockpit/kubernetes
if [ "$1" = "stop" ]; then
container=$(docker ps | grep cockpit/kubernetes | awk '{print $1}')
docker stop "$container"
View .mage.yml
log_dir: ./temp
user: debian
host_path: /home/debian/
- .docker/data
- .gitlab
- .platform
Basster / symfony
Last active Nov 28, 2017
Docker-Compose Symfony Console
View symfony
#!/usr/bin/env bash
docker-compose run -u "$UID" -w /var/www/html --no-deps --rm php bin/console $@
View typeface-comments.js
import _ from 'lodash';
import React from 'react';
import ReactDOM from 'react-dom';
import Router from '../module/router';
import {api} from '../common/api';
import {Comment} from './comment';
import {Counter} from './counter';
import {TypefaceCommentForm} from './typeface-comment-form';
export class TypefaceComments extends React.Component {
View api.js
import $ from 'jquery';
import _ from 'lodash';
import Router from '../module/router';
export class Api {
getComments(typeface, callback) {
$.getJSON(Router.generate('typeface_comments', {'slug': typeface}), callback);
deleteComment(typeface, id, callback) {
Basster / ServiceContainerTest.php
Created Jun 16, 2017
Class ServiceContainerTest boots up the kernel to test whether all service configurations are valid.
View ServiceContainerTest.php
namespace Tests\DI;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
* Class ServiceContainerTest boots up the kernel to test whether all service configurations are valid.
You can’t perform that action at this time.