Skip to content

Instantly share code, notes, and snippets.

View xserrat's full-sized avatar
:octocat:
coding as much as I can!

Xavier Serrat Bordas xserrat

:octocat:
coding as much as I can!
  • @ deporvillage
  • Barcelona
  • 06:50 (UTC +02:00)
  • X @xserrat
View GitHub Profile
@xserrat
xserrat / netboot-pi-config.json
Created March 13, 2022 19:19 — forked from sdwilsh/netboot-pi-config.json
Packer Config for Network Booting a Pi 4
{
"variables": {
"eth0_ipv4": "",
"eth0_ipv6": "",
"eth0_gateway": "",
"eth0_dns": "",
"hostname": "",
"iscsi_initiator_iqn": "",
"iscsi_target_iqn": "",
"iscsi_target_ip": "",
@xserrat
xserrat / phpenv-macos.sh
Last active December 6, 2021 17:09 — forked from edufabra/phpenv-macos.sh
Install phpenv on macOS with homebrew php packages.
#!/usr/bin/env bash
# vim: ai ts=2 sw=2 et sts=2 ft=sh
# Install or re-install phpenv with
# multiple versions of PHP on macOS.
#
# Usage:
#
# curl -L https://git.io/J1Mtt | bash
#
@xserrat
xserrat / ruleset.xml
Created September 1, 2021 17:58 — forked from gsherwood/ruleset.xml
PSR2 with tabs instead of spaces
<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>PSR2 with tabs instead of spaces.</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
</rule>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
@xserrat
xserrat / ZendKernel.php
Created July 2, 2020 16:12 — forked from havvg/ZendKernel.php
StackPHP Example: Symfony + Zend Framework (ZF1)
<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
class ZendKernel implements HttpKernelInterface, TerminableInterface
@xserrat
xserrat / reference.yml
Created November 5, 2019 16:14 — forked from mnapoli/reference.yml
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
@xserrat
xserrat / iterm2-solarized.md
Created August 20, 2019 19:33 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@xserrat
xserrat / git_rebase.md
Created February 8, 2019 23:00 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@xserrat
xserrat / uuid_pecl_ubuntu_install.sh
Created April 7, 2016 19:17 — forked from robap/uuid_pecl_ubuntu_install.sh
Install uuid pecl exension on Ubuntu
sudo apt-get install uuid-dev
sudo pecl install uuid
@xserrat
xserrat / xdebug.ini
Created July 2, 2015 12:02
Xdebug config /etc/php5/conf.d/xdebug.ini
xdebug.idekey=vagrant
xdebug.remote_connect_back=1
xdebug.default_enable=1
xdebug.remote_autostart=0
xdebug.remote_enable=1
zend_extension=/usr/lib/php5/20131226/xdebug.so
xdebug.remote_port=9000
xdebug.remote_handler=dbgp