Skip to content

Instantly share code, notes, and snippets.

View ricpelo's full-sized avatar

Ricardo Pérez ricpelo

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="console" version="1" kateversion="2.2" section="Markup">
<highlighting>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text" >
<StringDetect attribute="Comment" context="Comment" String="#"/>
<RegExpr attribute="Tag" context="Attribute" String="&lt;[a-zA-Z_:][a-zA-Z0-9._:-]*" />
<RegExpr attribute="Prompt" String="^\$ " />
</context>
#!/bin/sh
sudo sed -i '/^deb https\\?:\/\/deb.debian.org\/debian\/ unstable main non-free contrib$/d' /etc/apt/sources.list
if ! grep -qs "^deb https\?://deb.debian.org/debian/ unstable main non-free contrib$" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
echo "\ndeb https://deb.debian.org/debian/ unstable main non-free contrib" | sudo tee -a /etc/apt/sources.list > /dev/null
fi
if ! grep -qs "^deb-src https\?://deb.debian.org/debian/ unstable main non-free contrib$" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
echo "deb-src https://deb.debian.org/debian/ unstable main non-free contrib" | sudo tee -a /etc/apt/sources.list > /dev/null
@ricpelo
ricpelo / index.php
Last active January 11, 2018 11:56
Ejemplo de inyección de dependencias con el contenedor de Yii 2
<?php
session_start();
define('YII_ENV', getenv('YII_ENV') ?: 'dev');
define('YII_DEBUG', getenv('YII_DEBUG') ?: YII_ENV == 'dev');
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
@ricpelo
ricpelo / setup.sh
Created August 23, 2017 14:38 — forked from eduwass/setup.sh
Flynn Install : Single node ( for Ubuntu 14.04 x64 @ DigitalOcean droplet )
#!/bin/bash
# This script will automatically set up a single node Flynn Cluster on your linux box
# Fresh Flynn install with domain provided by the xip.io service
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet
# @date 16 Nov 2015
# @author Edu Wass (eduwass at gmail com)
echo '---- START SETUP ----'
@ricpelo
ricpelo / gist:f3761f2e44a255001ca63f98e2c1aaee
Created January 30, 2017 08:45
Instalación de asciidoctor-mathematical en Ubuntu
https://github.com/asciidoctor/asciidoctor-mathematical
$ sudo apt install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev ttf-lyx
$ MATHEMATICAL_SKIP_STRDUP=1 sudo -E gem install mathematical --no-document
$ sudo ln -sf /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/lasem/liblasem.so /usr/local/lib/liblasem.so
$ sudo ldconfig
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('views')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],