Skip to content

Instantly share code, notes, and snippets.

View williamespindola's full-sized avatar

William Espindola williamespindola

View GitHub Profile
@sophiaphillipa
sophiaphillipa / delegates.xml
Last active May 31, 2023 15:18
ImageMagick how to convert EPS to PNG with Quality and Transparency
<!--
To dicovery where is delegates convert -list delegate
Must pass this commands to GS: -dUseCIEColor -sDEVICE=pngalpha
-->
<delegate decode="ps:cmyk" stealth="True" command="&quot;gs&quot; -q -dQUIET -dUseCIEColor -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &quot;-sDEVICE=pngalpha&quot; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &quot;-r%s&quot; %s &quot;-sOutputFile=%s&quot; &quot;-f%s&quot; &quot;-f%s&quot;"/>
@hollodotme
hollodotme / Install-php7.md
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
import XMonad
import XMonad.Config.Azerty
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig
import Graphics.X11.ExtraTypes.XF86
import XMonad.Layout.Spacing
import XMonad.Layout.NoBorders(smartBorders)
import XMonad.Layout.PerWorkspace
@henriquemoody
henriquemoody / br-cities.php
Last active June 1, 2020 12:50
Lista de cidades brasileiras com base nos dados o IBGE
<?php
return [
// http://www.cidades.ibge.gov.br/download/mapa_e_municipios.php?uf=ac (Thu May 14 16:30:15 BRT 2015)
'AC' => [
1200013 => 'Acrelândia',
1200054 => 'Assis Brasil',
1200104 => 'Brasiléia',
1200138 => 'Bujari',
1200179 => 'Capixaba',
@alganet
alganet / md.md
Last active March 19, 2018 11:55
Non-Fluent Respect\Validation

Non-Fluent Respect\Validation

Hi! I'm one of the developers of Respect\Validation and other less known Respect components. Feel free to ask any questions here or on reddit.

There are many micro-frameworks that rely on magic methods. We don't. In this article I'm gonna explore the Respect\Validation API without fluent interfaces or magic methods. I'll use a traditional dependency injection approach.

The following validator was inspired by one of our README examples:

@millermedeiros
millermedeiros / osx_setup.md
Last active June 26, 2024 22:08
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@alganet
alganet / relational.md
Last active August 30, 2017 13:34
Respect\Relational Filtered, Mixed and Typed Collections

Basics

<?php

use Respect\Relational\Mapper;
use Respect\Data\Collections\Collection;

//Configuring
@zenorocha
zenorocha / README.md
Last active May 28, 2024 08:23
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@millermedeiros
millermedeiros / gist:3057782
Created July 6, 2012 02:52
Links sobre otimização de performance (WPO)
@henriquemoody
henriquemoody / content-finder.bash
Last active October 6, 2015 18:18
[content-finder] Find content into files.
#!/usr/bin/env bash
# Usage: {script} OPTIONS
# Find content into files.
#
# -h, --help Displays this help
# -a, --action Action to perform: "search", "files" or a sed pattern to
# apply to files (default "search")
# -d, --directory Directory to search (default ".")
# -e, --extension Extensions to search on (default "*")
# -x, --exclude Pattern to exclude