Skip to content

Instantly share code, notes, and snippets.

View mparramont's full-sized avatar

Miguel Parramón Teixidó mparramont

View GitHub Profile
@mparramont
mparramont / boy_scout.js
Created April 1, 2021 10:08
Disable all existing ESlint errors with eslint-disable-line
// First, run eslint -f json -o warnings.json
// Then, run this file
const fs = require('fs')
const json = require('./warnings.json')
json.forEach(({ filePath, messages, source }) => {
// if there is no source we have nothing that needs to be eslint-ignore'd
if (!source) {
return
}
@mparramont
mparramont / dual_booting_a_composer_app.md
Created February 3, 2021 06:15
How to Dual Boot a Composer app

How to Dual Boot a Composer app

In this article we will learn how to dual boot any composer app (like a Yii2 app) in a local environment and continuous integration (CI) service. This can be used to upgrade the version of Composer, PHP, or even maybe Yii, along the way with normal development, even if it's a process that spans many weeks or months.

This is inspired by Jordan Raine's talk about Clio's process to upgrade Rails over the years (You can watch it over here: Ten Years of Yii Upgrades), this post by Ernesto Tagwerker, and my own experiences about doing this on the Kantox B2B Forex Fintech platform.

Create a composer-next.json File

First, we need to initialize the composer-next.json file like this:

@mparramont
mparramont / .cvimcr
Last active August 29, 2015 14:13
cVimrc
" this will enable the config block below on the domain 'reddit.com'
site '*://twitter.com/*' {
unmap j
unmap k
}
site '*://feedly.com/*' {
unmap j
unmap k
unmap v
}
<body><h1>Hi!</h1></body>
# List of environments and their heroku git remotes
ENVIRONMENTS = {
:staging => 'myapp-staging',
:production => 'myapp-production'
}
namespace :deploy do
ENVIRONMENTS.keys.each do |env|
desc "Deploy to #{env}"
task env do
@mparramont
mparramont / apple.com-UA-discrimination.md
Created August 1, 2013 15:49
Is apple.com doing User-Agent based discrimination?

Safari, Chrome Left: Safari, version 6.0.5 (8536.30.1) Right: Chrome,version 29.0.1547.32 beta

Both pages loaded at more or less the same time. Tried reloading both several times, same behavior.

Also experimenting "exceptional demand" on Firefox Aurora and stable: Firefox Aurora Firefox stable