Skip to content

Instantly share code, notes, and snippets.

@raphaelstolt
raphaelstolt / php54_php53_pear_macports.markdown
Created May 17, 2012 21:37
Installing PHP 5.4 and 5.3 side by side on Max OSX via MacPorts

##Given Apache 2 and MySQL are already installed.

#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated

#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules

@K-Phoen
K-Phoen / config.yml
Created December 18, 2012 11:22
Storing Symfony2 sessions in memcached
imports:
# ....
- { resource: services/session.yml }
framework:
# ....
session:
handler_id: session.handler.memcached
{
"auto_match_enabled": false,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"create_window_at_startup": false,
"default_line_ending": "unix",
"draw_minimap_border": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@demonixis
demonixis / PersonClass.js
Last active November 8, 2021 15:26
A basic Person class in JavaScript
/***********************************
* First method to create a classe *
* *********************************/
var Person = function (firstname, lastname, age) {
this.firstName = firstname;
this.lastName = lastname;
this.age = age;
this.setAge = function (age) {
@dbu
dbu / CaseInsensitiveStringFilter.php
Last active July 18, 2023 18:04
Case insensitive filtering with sonata admin in postgres
<?php
namespace Liip\AcmeBundle\Filter;
use Sonata\AdminBundle\Form\Type\Filter\ChoiceType;
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Sonata\DoctrineORMAdminBundle\Filter\StringFilter;
class CaseInsensitiveStringFilter extends StringFilter
{
typeof(+undefined|0)
typeof(+NaN|0)
typeof(+null|0)
typeof(+0|0)
typeof(+[]|0)
typeof(+{}|0)
typeof(+"2"|0)
typeof(+1|0)
// +yourValue|0
@ruario
ruario / README.md
Last active January 7, 2023 20:52
Installs (or updates) PPAPI Flash, so that it can be used by Chromium-based browsers

Usage

If you use Ubuntu or a derivative distro, issue the following to install an appropriate version of Flash:

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu `lsb_release -cs` partner" 
sudo apt update
sudo apt install adobe-flashplugin

If your distro does not provide a copy of Pepper Flash that works with Vivaldi, this script will download and install it for you. To use, click on the "Download ZIP" button listed on the GitHub Gist page and then unpack the .zip archive locally. You should now have a directory containing the file "latest-pepper-flash.sh".

@rayrutjes
rayrutjes / Dockerfile
Created August 9, 2015 11:52
Official php dockerfile with xdebug
FROM php:5.6-fpm
RUN curl -L -o /tmp/xdebug-2.3.3.tgz http://xdebug.org/files/xdebug-2.3.3.tgz \
&& tar xfz /tmp/xdebug-2.3.3.tgz \
&& rm -r /tmp/xdebug-2.3.3.tgz \
&& mv xdebug-2.3.3 /usr/src/php/ext/xdebug \
&& docker-php-ext-install xdebug
CMD ["php-fpm"]
@staltz
staltz / migration-guide.md
Last active December 19, 2023 22:14
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  ```diff
  - foo
  + bar

Example: