Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |
# When using RN in combination with Cocoapods, a lot of | |
# things are broken. These are the fixes we had to append | |
# to our Podfile when upgrading to [email protected]. | |
# | |
# WARNING: Check those line numbers when you're on a different version! | |
def change_lines_in_file(file_path, &change) | |
print "Fixing #{file_path}...\n" | |
contents = [] |
@version:3.6 | |
@include "scl.conf" | |
options { | |
flush-timeout(2000); | |
chain-hostnames(no); | |
use-dns(yes); | |
use-fqdn(no); | |
create-dirs(yes); | |
keep-hostname(yes); |
import json | |
import boto3 | |
import paramiko | |
def worker_handler(event, context): | |
ALLOWED_HOSTS = [ | |
'host1', | |
'host2, |
# linux send h264 rtp stream: | |
gst-launch-1.0 -v ximagesrc ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000 | |
# Macos send h264 rtp stream: | |
gst-launch-1.0 -v avfvideosrc capture-screen=true ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000 | |
# receive h264 rtp stream: | |
gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink |
#!/usr/bin/env python | |
# | |
# Copyright (c) 2016, PagerDuty, Inc. <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
#!/bin/bash | |
# | |
# Cancel all pulp tasks that are just in a specifiedstate | |
tmpfile=/tmp/tasks | |
read -p "Enter task state to kill, e.g. Waiting: " ans | |
echo "" | |
if [ "${#ans}" -gt 0 ] | |
then |
#!/bin/bash | |
# Thomas Merkel <[email protected]> | |
# Check PyPI mirror with nagios | |
PROGPATH=$(echo ${0} | sed -e 's,[\\/][^\\/][^\\/]*$,,') | |
REVISION="1.1" | |
source ${PROGPATH}/utils.sh | |
# Function to print help |
In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.
We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.
I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.