Skip to content

Instantly share code, notes, and snippets.

@jheimbach
jheimbach / docker-compose-all.sh
Last active June 3, 2022 09:42
Docker compose all
#!/bin/bash
# runs docker-compose commands in all working dirs where docker-compose container are running
running_projects=$(curl -s --unix-socket /var/run/docker.sock http://localhost/containers/json | jq -r '.[]|.Labels|."com.docker.compose.project.working_dir" | select(. != null)' | uniq)
for project_wd in $running_projects
do
cd $project_wd
docker-compose $@
done
[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/opt/phpstorm/bin/phpstorm.png
Exec="/opt/phpstorm/bin/phpstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm
@jheimbach
jheimbach / Makefile
Created April 14, 2014 13:38
Makefile for Template Gitsubtree
addTemplate:
git remote add -f template AdressToTemplateGit
git subtree add --prefix web/frontend template master --squash
pullTemplate:
git fetch template
git subtree pull --prefix web/frontend template master --squash
pushTemplate:
git subtree push --prefix web/frontend template master --squash
@jheimbach
jheimbach / gist:10194528
Created April 8, 2014 21:21
Array from CSV-File
<?php
$header = null;
$data = array();
if (($handle = fopen($file, 'r')) !== false) {
while (($row = fgetcsv($handle, 1000, $delimiter)) !== false) {
if (!$header) {
$header = $row;
} else {
$data[] = array_combine($header, $row);
@jheimbach
jheimbach / lightbox.coffee
Last active January 4, 2016 19:20
Simple Lightbox in Coffeescript
class Lightbox
setStructure: ->
lightbox = '<div id="lightbox">' +
'<div id="lightbox_content">' +
'<a class="close_lightbox" href="javascript:void(0)">Schließen</a>' +
'<div class="lightbox_text"></div> ' +
'</div>' +
'</div>';
$('body').append(lightbox)
@jheimbach
jheimbach / npm-debug.log
Created November 13, 2013 21:26
npm-debug.log for dalekjs-browser-chrome
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using npm@1.3.14
3 info using node@v0.10.22
4 verbose node symlink /usr/bin/node
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ '/var/www/dalekjs_testcase',
6 verbose install [ 'grunt',
6 verbose install 'matchdep',
6 verbose install 'grunt-contrib-connect',
Host hostname
HostName hostname
Port 22
User git
IdentityFile path/to/rsa_key
sudo apt-get install linux-headers-$(uname -r)
@jheimbach
jheimbach / ubuntu-php-development-environment.md
Last active December 16, 2025 23:18 — forked from DaRaFF/ubuntu-php-development-environment.md
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for live environment!

I hope it's a help also for you!

#Installation stack