Skip to content

Instantly share code, notes, and snippets.

View alanjds's full-sized avatar

Alan Justino da Silva alanjds

  • Santo André, São Paulo/SP - Brazil
View GitHub Profile
@friek
friek / joingroup.py
Last active July 9, 2025 09:13
Join a multicast group in python and receive data
#!/usr/bin/env python3
import socket
import sys
def main(argv):
multicast_group = argv[1]
multicast_port = int(argv[2])
interface_ip = argv[3]
@weakish
weakish / doctest.md
Created November 4, 2018 15:33
#survey of #Ruby #doctest

Ruby Doctest

Doctest in Python is a good design. Doctest ensures code, documentation, and tests are in a single place. So readers can understand the logic of code easier, without a lot of navigation.

Unlike Python, Ruby does not have built-in doctest, but there are some third party libraries enabling doctest in Ruby.

@julianxhokaxhiu
julianxhokaxhiu / README.md
Last active September 8, 2025 06:38
Enable autodiscover AirPlay Client support on Arch Linux ( like on macOS )

Enable autodiscover AirPlay Client support on Arch Linux ( like on macOS )

Step 1

Install required dependencies

$ pacman -S avahi pulseaudio-zeroconf

Step 2

@ziazek
ziazek / backup.yml
Created May 10, 2023 08:18
Fly.io Database Backup
name: Back up database
run-name: Task
on:
schedule:
- cron: '0 */6 * * *'
# every 6 hours
workflow_dispatch:
jobs:
backup:
runs-on: ubuntu-latest
import datetime
import sys
from typing import Optional
import colorama
import pyramid.config
from loguru import logger
from pyramid.request import Request
from pyramid.response import Response
{
"env": {
"PATH": "$(PATH):$(HOME)\/.local\/bin"
},
"apps": [
{
"name": "720p60 Desktop",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",