Skip to content

Instantly share code, notes, and snippets.

View rgomezcasas's full-sized avatar
☀️
deletin' code

Rafa Gómez rgomezcasas

☀️
deletin' code
View GitHub Profile
@rgomezcasas
rgomezcasas / .bashrc
Last active September 27, 2016 13:19
Basic [dot]files
alias phpunit='./vendor/bin/phpunit --colors'
alias pf='./vendor/bin/phpunit --filter'
alias ..='cd ..'
alias ll='ls -alF'
alias la='ls -A'
<?php
// We want to find all users born after 1950
$users = [new User(1994), new User(2000), new User(1900), new User(25)];
$usersBornedAfter1950 = [];
foreach ($users as $user) {
if ($user->birthYear() > 1950) {
@rgomezcasas
rgomezcasas / RenameUserCommand.php
Created September 18, 2017 18:08
Command Example
<?php
final class RenameUserCommand extends Command
{
private $userId;
private $newName;
public function __construct(string $userId, string $newName)
{
$this->userId = $userId;
@rgomezcasas
rgomezcasas / javi.php
Created September 18, 2017 18:17
Whatever
<?php
echo "Javi no es el mejor.";
@rgomezcasas
rgomezcasas / Idea.vmoptions
Created April 25, 2018 08:41
Best vm options configuration for Scala Intellij
-ea
-server
-Xms2048m
-Xmx4096m
-Xss2m
-Xverify:none
-Dawt.useSystemAAFontSettings=lcd
-Dfile.encoding=UTF-8
@rgomezcasas
rgomezcasas / tcr.sh
Last active June 16, 2020 07:14
TCR
# -----------
# Explanation
mkdir tmp
echo "exit 0" > test
./test && echo "commit" || echo "revert"
# Should output "commit"
echo "exit 1" > test
./test && echo "commit" || echo "revert"