Skip to content

Instantly share code, notes, and snippets.

@dksmiffs
dksmiffs / URL.txt
Created March 4, 2018 15:19
Dan Bricklin's software that lasts 200 years essay
http://www.bricklin.com/200yearsoftware.htm
@dksmiffs
dksmiffs / Drop.kt
Created May 15, 2018 20:32
This is a Kotlin gist for the "Extended Simple App" LibGDX tutorial found at: https://github.com/libgdx/libgdx/wiki/Extending-the-simple-game. The Java version is here: https://gist.github.com/sinistersnare/6367829
package drop
import com.badlogic.gdx.Game;
import com.badlogic.gdx.graphics.g2d.BitmapFont
import com.badlogic.gdx.graphics.g2d.SpriteBatch
class Drop : Game() {
public lateinit var batch: SpriteBatch
public lateinit var font: BitmapFont
@dksmiffs
dksmiffs / README.md
Last active May 15, 2018 22:23 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@dksmiffs
dksmiffs / multicast-rcv.py
Last active December 8, 2022 00:45
Python 3 UDP multicast example, with only very minor modifications needed to this guidance: https://stackoverflow.com/a/1794373
# Multicast receiver
# Guidance: https://stackoverflow.com/a/1794373
import socket
import struct
MCAST_GRP = '224.1.1.1'
MCAST_PORT = 5007
IS_ALL_GROUPS = True
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
@dksmiffs
dksmiffs / udp-rcv.py
Last active December 9, 2021 02:04
Python 3 UDP example, with only very minor modifications needed to this guidance: https://wiki.python.org/moin/UdpCommunication
# Simple example that receives UDP messages using Python 3
# Guidance: https://wiki.python.org/moin/UdpCommunication
import socket
UDP_IP = '127.0.0.1'
UDP_PORT = 5005
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
@dksmiffs
dksmiffs / multicast-rcv.cpp
Last active June 23, 2022 09:20
Linux C++ UDP multicast example, guidance here: https://www.tenouk.com/Module41c.html
// Guidance: https://www.tenouk.com/Module41c.html
#include <arpa/inet.h>
#include <array>
#include <iostream>
#include <netinet/in.h>
#include "udpSock.hpp"
#include "zz_diagnose.hpp"
int main()
{