Skip to content

Instantly share code, notes, and snippets.

View markuszeller's full-sized avatar
🍪
Eating Cookies

Markus Zeller markuszeller

🍪
Eating Cookies
View GitHub Profile
@jacmkno
jacmkno / BashPromise.php
Last active February 25, 2023 08:42
Promises in PHP with Asyncronous Bash Execution
<?php
namespace Promises;
class BashPromise extends Promise {
public $outputTmpFile;
public $inputTmpFile;
function __construct($process, $inputData=NULL, $inputAsStdIn = FALSE){
$inputExtra = '';
if($inputData){
$this->inputTmpFile = tempnam("/tmp", "PHPBashPromiseIn");
@carstenwindler
carstenwindler / xdebug.sh
Last active May 21, 2024 13:44
Bash script to quickly enable / disable xdebug in a PHP docker container
#!/usr/bin/env bash
# see https://carstenwindler.de/php/enable-xdebug-on-demand-in-your-local-docker-environment/
if [ "$#" -ne 1 ]; then
SCRIPT_PATH=`basename "$0"`
echo "Usage: $SCRIPT_PATH enable|disable"
exit 1;
fi
# Expects service to be called app in docker-compose.yml
@jasonzhouu
jasonzhouu / oh-my-zsh-agnoster-light-theme.md
Last active April 4, 2024 15:20
zsh agnoster light theme
  1. save agnoster-light.zsh-theme to ~/.oh-my-zsh/themes/.
  2. edit ZSH_THEME in ~/.zshrc to agnoster-light
  3. change the color theme of terminal to solarized-light
  4. open a new terminal
@nichtich
nichtich / README.md
Last active June 6, 2024 02:05 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)