Skip to content

Instantly share code, notes, and snippets.

@skywodd
skywodd / resize_gif.py
Created November 3, 2017 12:48
Resize GIF image using Python Pillow library
from PIL import Image, ImageSequence
# Output (max) size
size = 320, 240
# Open source
im = Image.open("in.gif")
# Get sequence iterator
frames = ImageSequence.Iterator(im)
@subfuzion
subfuzion / curl.md
Last active July 25, 2024 08:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@abevoelker
abevoelker / pipelines.py
Last active March 17, 2024 05:59
scrapy RabbitMQ pipeline
# project_name/pipelines.py
from scrapy import signals
from scrapy.utils.serialize import ScrapyJSONEncoder
from scrapy.xlib.pydispatch import dispatcher
from carrot.connection import BrokerConnection
from carrot.messaging import Publisher
from twisted.internet.threads import deferToThread