Skip to content

Instantly share code, notes, and snippets.

carlosescri / 0001-PHP-5.6-LibSSL-1.1-compatibility.patch
Last active May 20, 2020
This is a backup of a patched formula to install PHP 5.6 in Mac OS X Catalina.
View 0001-PHP-5.6-LibSSL-1.1-compatibility.patch
Subject: [PATCH] PHP 5.6 - LibSSL 1.1 compatibility
This patch does not try to backport the 7.1 openssl module, it is the
improved version of the 5.6 original openssl module.
Upstream-Status: Deny []
Reason: As PHP 5.6 is no longer actively supported only security fixes
carlosescri / .profile
Last active Oct 22, 2018 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
View .profile
export GPG_TTY
carlosescri / shadows.scss
Created May 24, 2016 — forked from paulmelnikow/shadows.scss
Sass Mixin: Google Material Design Shadow
View shadows.scss
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
* Adapted from a LESS version at
* Original Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
drorata / gist:146ce50807d16fd4a6aa
Last active Apr 8, 2021
Minimal Working example of Elasticsearch scrolling using Python client
View gist:146ce50807d16fd4a6aa
# Initialize the scroll
page =
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
carlosescri / gist:9109848
Last active Feb 13, 2020
Some commands to clean Ubuntu from trash, old kernels...
View gist:9109848
$ sudo apt-get autoclean
$ sudo apt-get clean
$ sudo apt-get autoremove
# if you installed the debian-goodies package...
$ dpigs -H -n 25
# You can install ncdu to find large files in a graphical interface through terminal
$ ncdu
terkel / _decimal.scss
Last active Apr 17, 2021
Rounding decimals in Sass
View _decimal.scss
// _decimal.scss | MIT License |
// Round a number to specified digits.
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
dbarnett /
Created Feb 3, 2012
JSONAlchemy: Proper JSON marshalling and mutation tracking in SQLAlchemy
import simplejson
import sqlalchemy
from sqlalchemy import String
from sqlalchemy.ext.mutable import Mutable
class JSONEncodedObj(sqlalchemy.types.TypeDecorator):
"""Represents an immutable structure as a json-encoded string."""
impl = String
kevinold /
Created Aug 19, 2010
testing git-flow on existing git repo
# In reply to my own question
# (
# about using git-flow with existing git repos I experimented with a dummy
# git repo and it appears rather straight-forward
kold@Macintosh-27 $ git init test_git_flow
Initialized empty Git repository in /private/tmp/test_git_flow/.git/
kold@Macintosh-27 $ cd test_git_flow/