Skip to content

Instantly share code, notes, and snippets.

View astrolox's full-sized avatar
😎
Improving the Internet - Got a question?

Brian Wojtczak astrolox

😎
Improving the Internet - Got a question?
View GitHub Profile
@travelhawk
travelhawk / Streaming Protocols.md
Last active November 25, 2022 07:52
Comparison of streaming protocols

RTMP: Real Time Messaging Protocol (TCP)

Video codecs: H.264
Audio codecs: AAC
Latency: 2 - 30 seconds

Pros: Multicast support, low buffering, wide platform support
Cons: Old codecs, somewhat low security, relatively high latency

WebRTC: Web Real-Time Communication (both UDP and TCP)

@rithvikvibhu
rithvikvibhu / LICENSE
Last active July 22, 2024 12:04
Get tokens for Google Home Foyer API
MIT License
Copyright (c) 2020 Rithvik Vibhu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@nikhita
nikhita / gtk-protocol-linux.md
Created April 26, 2020 15:41
gtk: "No protocol specified" error on Linux as root user

GTK protocol error

Problem

If you are running as a root user while opening a GTK session on Linux i.e. using sudo, su, etc, you might encounter errors like:

No protocol specified
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
 warnings.warn(str(e), _gtk.Warning)
@astrolox
astrolox / LICENSE
Last active April 5, 2024 03:08
Implementing Socket IO event handling via Blueprint in Flask-SocketIO - without using a single global socketio object.
Copyright 2020 Brian Wojtczak
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@Lisprez
Lisprez / epoll.go
Created March 29, 2019 06:47 — forked from tevino/epoll.go
Golang example for using epoll
package main
import (
"fmt"
"net"
"os"
"syscall"
)
const (
@jschaf
jschaf / scratch_server.go
Created March 12, 2019 07:40
A Go web server from scratch using syscalls
package main
// Simple, single-threaded server using system calls instead of the net library.
//
// Omitted features from the go net package:
//
// - TLS
// - Most error checking
// - Only supports bodies that close, no persistent or chunked connections
// - Redirects
@F21
F21 / raft.go
Created November 15, 2017 05:05
Sample hashicorp/raft + hashicorp/serf app
package main
import (
"crypto/md5"
"flag"
"fmt"
"io"
"log"
"os"
"path/filepath"
package main
import (
"bufio"
"fmt"
"github.com/yl2chen/cidranger"
"math/rand"
"net"
"os"
"time"
package main
import (
"bufio"
"fmt"
"github.com/k-sone/critbitgo"
"math/rand"
"os"
"time"
)