Skip to content

Instantly share code, notes, and snippets.

View plandolt's full-sized avatar

Patrick Landolt plandolt

View GitHub Profile
@Toflar
Toflar / index.php.patch
Last active November 7, 2018 12:09
Symfony 4 index.php with env data for production
<?php
use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\HttpFoundation\Request;
require __DIR__.'/../vendor/autoload.php';
// The check is to ensure we don't use .env in production
@Toflar
Toflar / gist:5d64cd4a10b0cefcec5e88a584e8dd6f
Created December 13, 2017 13:54
sf function for bash_profile
sf() {
if [ -f ./vendor/bin/contao-console ]; then
./vendor/bin/contao-console $@
return $?
fi;
if [ -f ./bin/console ]; then
./bin/console $@
return $?
fi;
if [ -f ./app/console ]; then
@richard-scott
richard-scott / 00_description
Created December 13, 2016 10:52 — forked from halberom/00_description
ansible - example of using filters to change each item in a list
The problem:
I wanted to use the jinja 'map' filter to modify each item in a string, in this simple
example, adding '.conf' to each item.
The 'format' filter in jinja takes arguments (value, *args, **kwargs). Unfortunately,
it uses 'value' as the pattern. When called inside map 'value' is the current item in
the list, or in other words *args as far as format is concerned. So it's the wrong way
around.
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 12, 2025 22:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx