Skip to content

Instantly share code, notes, and snippets.

location / {
if ($request_method = OPTIONS) {
add_header Content-Length 0;
add_header Content-Type text/plain;
return 200;
}
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_max_temp_file_size 0;

A/V calls in Conversations

Here are some short notes for server admins and developers of other XMPP clients.

Notes for server admins

Most calls will require server side assistence. Depending on the network it might be enough to have a STUN server for Conversations to learn your external IP and punch a hole in the NAT. On some, more restrictive, networks however this isn’t enough and Conversations will need a TURN server. TURN servers are used to proxy the entire (encrypted) traffic through the server. (In my initial testing this was often the case when mobile networks were involved.)

To ensure best possible user experience in all situations server admins should set up both.

import time
import board
import adafruit_dht
import paho.mqtt.publish as publish
dhtDevice = adafruit_dht.DHT11(board.D14)
broker_address = "192.168.2.52"
port = 1883
client_id = "python"
username = "foo"
"""Script to reset time on CardIO via serial, run on HOST computer
inspired by: https://badge.team/projects/suckless_flash
"""
from __future__ import print_function
import sys, time
dev=open("/dev/ttyACM0", "w")
print(chr(0x03), end="", file=dev)
" Highlight trailing whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
au ColorScheme * highlight ExtraWhitespace guibg=red
au BufEnter * match ExtraWhitespace /\s\+$/
au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
au InsertLeave * match ExtraWhiteSpace /\s\+$/
<iq id='set1'
type='set'
to='hackerbeach@chat.kosmos.org'>
<vCard xmlns='vcard-temp'>
<PHOTO>
<TYPE>image/png</TYPE>
<BINVAL>
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAAAAAB5Gfe6AAAIi0lEQVR42u2deWwUZRiHZ2Z7QFtoFyhtkQqIggoECkiUSyEFW2yLhYCRIwgqkRgOQyKKhkA4xOCFQRIQIgZDTBStEGhpoRAQsMYYSPAPoZRGLrl7bLdl226lJUJblt35jpnfzPR9/ibwvg/vd3/zrdLQxlHQAaAhAegA0JAAdABoSAA6ADQkAB0AGhKADgANCUAHgIYEoANAQwLQAaAhAegA0JAAdABoSAA6ADQkAB0AGhKADgANCUAHgIYEoANAQwLQAaAhAegA0JAAdABoSAA6ADQkAB0AGhKADgANCUAHgIYEsPxhv7fs2mWLc63MW2+QAN/Z9ZOHdFIsjjsl+7Mzt40QkDehezg6O32Ed0vbJVuA/9Sc9ui8WGg386RfqoCCJBWdExtqwl6JAmrWJ6ITYqfrOq8sAfXr0cnw8bGe4UCPgLxYdCp8dNTTFeoQUDwAnQkvff+SIaBqhs36v/uoUyslCMi1yegfiPCfJAiYhM5ChHRxAf9YfvIbjLhSYQGrXOgkRHB9EGpCGErA7YnoHMQYF2o2FEpA1XB0CmKklAkKqHi85V+oxVocrWW83a8JCrjVahWQ2GBxureMN+4yCRATUJZkbwHuf0kACRATQH2AvQUIV0CbHwVIAAlo4wKoE6QKsLcAqgCqAFEBxlWA31t+pmDL0tenZo0bNbT/oOcnzlq4dk9pZa1UAXEWXQzVlRfvXT0mwJGb9tScLSfKme54BBVgzdVgXcH8kV2jNCUganiXkUuOW0eA7Cbgrzi2cmiHEKdtmjt1+5U6awiQWwH+a9uGKPpIXl2s85KHjQTcXDe4ne6jVl
@raucao
raucao / .vimrc
Created December 21, 2018 07:49
Highlight trailing whitespace in vim
" Highlight trailing whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
@raucao
raucao / vim-typescript-plugins.sh
Last active September 3, 2018 05:01
Vim setup for TypeScript
# For use with Pathogen and Syntastic
# Install typescript-vim for syntax highlighting
git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/bundle/typescript-vim
# Install and compile procvim.vim
git clone https://github.com/Shougo/vimproc.vim.git ~/.vim/bundle/vimproc.vim
pushd ~/.vim/bundle/vimproc.vim
make
popd
#
# Cookbook Name:: kosmos-mastodon
# Recipe:: default
#
include_recipe "kosmos-nodejs"
include_recipe "kosmos-redis"
node.override['postgresql']['enable_pgdg_apt'] = false
include_recipe "postgresql::server"
include_recipe "postgresql::ruby"