Skip to content

Instantly share code, notes, and snippets.

View ivanderbu2's full-sized avatar

Ivan Radunovic ivanderbu2

View GitHub Profile
@pascalbaljet
pascalbaljet / blackfire-debian-ubuntu.sh
Last active May 5, 2023 11:40
Install Blackfire on Debian/Ubuntu
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Register the packagecloud key
wget -O - https://packagecloud.io/gpg.key | sudo apt-key add -
# Add deb http://packages.blackfire.io/debian any main to /etc/apt/sources.list.d/blackfire.list
@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active August 2, 2025 18:24
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@kapkaev
kapkaev / gist:4619127
Created January 24, 2013 09:30
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
$ redis-cli
> config set stop-writes-on-bgsave-error no
@barockok
barockok / Premailer.php
Created January 10, 2012 20:39 — forked from Synchro/Premailer.php
PHP interface class for the Premailer API
<?php
/**
* Premailer API PHP class
* Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail
* Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal
* Premailer is owned by Dialect Communications group
* @link http://premailer.dialect.ca/api
* @author Marcus Bointon <marcus@synchromedia.co.uk>
*/