This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
var initalArray = [1, 2, 3] | |
let pointer: UnsafeMutablePointer<Int> = UnsafeMutablePointer(initalArray) | |
let arrary = Array(UnsafeBufferPointer(start: pointer, count: initalArray.count)) |
$ ./get_cer_key_keyhash.sh graph.facebook.com | |
# it will output three files as | |
1. graph.facebook.com_keyhash.txt | |
2. graph.facebook.com.cer | |
3. graph.facebook.com.key |
# # # # # # # # # # | |
# USAGE: | |
# | |
# $accelUri = '' | |
# . '/' . 'internal_google_drive' | |
# . '/' . $google_drive_file_id | |
# . '/' . $filename | |
# . '/' . $google_drive_access_token; | |
# http_response_code(204); | |
# header('X-Accel-Redirect: ' . rawurlencode($accelUri)); |
# This code adapted from https://github.com/python-pillow/Pillow/issues/4644 to resolve an issue | |
# described in https://github.com/python-pillow/Pillow/issues/4640 | |
# | |
# There is a known issue with the Pillow library that messes up GIF transparency by replacing the | |
# transparent pixels with black pixels (among other issues) when the GIF is saved using PIL.Image.save(). | |
# This code works around the issue and allows us to properly generate transparent GIFs. | |
from typing import Tuple, List, Union | |
from collections import defaultdict | |
from random import randrange |
This guide is for discord.py 1.7 version. In upcoming v2.0, Webhooks were greatly overhauled and in fact simplified a lot. They no longer require adapters. Usage of webhooks is now quite straight forward. As such, this guide is now outdated and should not be followed.
Furthermore, this guide is focused on discord.py. No support for forks are covered in this guide.
Webhooks are a great way to send messages to Discord without having a bot account. You just need a webhook URL and just do a POST request on that URL and the message will be sent to discord.
Webhooks can also be used if your bot has to send messages to a channel a lot. For example, If your bot has event logging so everytime having to fetch channel and sending can be slow so you can use some webhook magic.
""" | |
Structlog example configuration with FastAPI. | |
Features: | |
- async bound logger | |
- contextvars to log request-id and other meta data | |
- custom format for default logging loggers and structlog loggers | |
""" | |
import asyncio | |
import logging |