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:
#!/usr/bin/env python | |
import sys | |
import socket | |
import xmlrpclib | |
import argparse | |
def supervisord_processes(address): | |
try: |
<?php | |
/** | |
* Get the hash of the current git HEAD | |
* @param str $branch The git branch to check | |
* @return mixed Either the hash or a boolean false | |
*/ | |
function get_current_git_commit( $branch='master' ) { | |
if ( $hash = file_get_contents( sprintf( '.git/refs/heads/%s', $branch ) ) ) { | |
return $hash; | |
} else { |
import sqlalchemy | |
from sqlalchemy import * | |
from sqlalchemy.ext.mutable import Mutable | |
class JSONEncodedObj(types.TypeDecorator): | |
"""Represents an immutable structure as a json-encoded string.""" | |
impl = String | |
def process_bind_param(self, value, dialect): |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
import getch | |
let ch = getch() | |
echo ch |
Create file /etc/systemd/system/[email protected]
. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin
, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
""" | |
Located under app/ | |
""" | |
import os | |
from django.apps import apps | |
from django.conf import settings | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") |