Skip to content

Instantly share code, notes, and snippets.


Armando Pérez Marqués mandx

View GitHub Profile
mandx /
Created May 21, 2020
Install everything PyLS (Python Language Server) related
pip install 'python-language-server[flake8,mccabe,pycodestyle,pydocstyle,pyflakes,pylint,rope]' pyls-mypy pyls-black django-stubs djangorestframework-stubs
mandx /
Created Jul 21, 2017
Simple Python 3 script to launch a new, clean Chrome instance
from subprocess import run
from tempfile import TemporaryDirectory
if __name__ == '__main__':
with TemporaryDirectory() as tempdir:
'--user-data-dir==' + tempdir,
# From
# The approach that has worked for me so far is this:
git rebase origin/master
# When the first conflict arises, I checkout the yarn.lock then re-perform the installation
git checkout origin/master -- yarn.lock
yarn install
mandx /
Created Jul 15, 2015
Script to copy a Rackspace server image from one data center (region) to another (by Andrew Howard)
# Author: Andrew Howard
# This script will copy an server image from one region to another.
# BE AWARE: This will incur charges for the customer. These charges
# can be minimized by using ServiceNet for the download and by choosing
# to auto-delete the Cloud Files content once the transfer is complete.
# Even with these precautions, the customer will be charged for storage
# fees in Cloud Files (for a single month) and Cloud Images (destination).
# Note: To use ServiceNet, this script MUST be run on a Cloud Server
View upstart.sentry.conf
start on startup
setuid itslocal
exec /path/to/the/python-lib/or/virtualenv/bin/sentry --config=/path/to/my/ start
mandx /
Created Dec 7, 2012
Some Django fields enhancements
# -*- coding: utf-8 -*-
Some custom field types
import re
from django.conf import settings
from django.db import models
mandx / dabblet.css
Created Apr 21, 2012
Vertical centering with Flexbox + margin fallback
View dabblet.css
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
You can’t perform that action at this time.