Skip to content

Instantly share code, notes, and snippets.

View egobude's full-sized avatar
😀
happy programmer

Benedikt Schmitz egobude

😀
happy programmer
  • ROSE Bikes GmbH
  • Bocholt, Germany
View GitHub Profile
@jeefy
jeefy / install-rancher-compose.sh
Last active January 25, 2021 11:14
Rancher Compose Install Script
#!/bin/bash
# To run locally: ` curl -s https://gist.githubusercontent.com/jeefy/7fed19a335d5caae24639e7ee7be1b71/raw/install-rancher-compose.sh | sh `
VERSION_NUM="0.9.2"
wget https://github.com/rancher/rancher-compose/releases/download/v${VERSION_NUM}/rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
tar zxf rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
rm rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose
@nezaniel
nezaniel / TagBasedAssetListImplementation
Created August 12, 2016 09:18
A TagBasedAssetListImplementation for Neos TypoScript 2
class TagBasedImageListImplementation extends TemplateImplementation {
/**
* @Flow\Inject
* @var TagRepository
*/
protected $tagRepository;
/**
* @Flow\Inject
FROM ubuntu:16.04
RUN PACKAGES="\
php-cli \
php-mysql \
php-intl \
php-xml \
php-curl \
php-dom \
" && \
@htuscher
htuscher / PageView.php
Created April 26, 2015 12:52
TYPO3 Neos track PageViews
<?php
namespace Jhoechtl\MySite\Domain\Model;
/* *
* This script belongs to the TYPO3 Flow package "Jhoechtl.MySite". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;
@Benjamin-K
Benjamin-K / EmailFinisher.php
Created February 20, 2015 14:13
TYPO3 Neos EmailFinisher
<?php
namespace WM\StarterKit\Finishers;
/**
* @author Benjamin Klix | die wegmeister gmbh
*/
class EmailFinisher extends \TYPO3\Form\Finishers\EmailFinisher {
/**
* Extends the functionality of the default parseOption() method
@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
<?php
namespace Sfi\Migration\Command;
/* *
* This script belongs to the TYPO3 Flow package "Sfi.Migration". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Cli\CommandController;
@stephanetimmermans
stephanetimmermans / ubuntu-compass-ruby
Last active July 4, 2019 12:48
Install Compass+Ruby on Ubuntu 14.04
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
@mneuhaus
mneuhaus / Idea.md
Created November 12, 2013 13:12
Database Data Versioning

Prolog

one issue that regularily occurs to me in a development project is how to keep in sync with the database. This is often no problem if you develop it yourself, alone. But if you're developing a project with more than one person the generally accepted best practice is to develop locally, commit changes and then deploy to the testing/staging/production. This is all and well with code of course. But keeping the database in sync is quite a hassle sometimes. Most systems provide at least schema-migrations or other means of analysing + patching the database. But what about the data itself? Currently there are 2-3 Scenarios that you could do:

  • develop locally and regularily dump the production database and import it locally
    • pro: fast project because everything is local and easily to develop
    • con: you regularily get out of sync and need to redo stuff manually or override the database
  • open up the production/staging database and let every local developer use that
  • pro: everyone uses the same dat