Skip to content

Instantly share code, notes, and snippets.

View citizenrich's full-sized avatar

Richard Stanley citizenrich

View GitHub Profile
@zpervan
zpervan / bazel_sfml_imgui.md
Last active December 8, 2022 02:22
Integrate Bazel with your SFML/Imgui projects on Ubuntu 20.04

Integrate Bazel into your Imgui/SFML projects on Ubuntu 20.04

Why use Bazel in the first place?

Some of you may ask why to use Bazel to build your project, aren't there already in-place solutions with CMake examples? And, to be honest, I thought the same, but in the end two major factors prevailed - curiosity and challenge! Also, as Bazel is slowly prying around the corner to be a popular build system, the syntax is more intuitive, readability is high and it's well documented on their official sites (but misses more examples IMHO). If you're interested what the cons and pros for Bazel against CMake are you can look up this page and check it in detail. 

Ok, I get it, now show me the how-to guide

First of all, you need Bazel installed on your system. Bazel's documentation is generous in these manners and you can look up the installation page for your OS and or, in our case, it's

@rokups
rokups / CMakeLists.txt
Last active May 11, 2024 07:29
Dear ImGui CMake build script.
#
# CMake build system for Dear ImGui
# =================================
#
# Build instructions:
# 1. Install latest CMake
# * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH)
# * Linux: from your favorite package manager
# * MacOS: brew install cmake
# 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders
@citizenrich
citizenrich / README.md
Created July 1, 2020 18:31
How to setup HAPI FHIR and Postgres in Docker

Start with a fresh folder and copy a hapi.properties into it. It will be mounted into the container.

Carefully make sure your hapi.properties looks like this:

# add postgres
datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://db:5432/hapi
hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect
datasource.username=admin
datasource.password=admin
@cbassa
cbassa / faketle.py
Last active November 22, 2021 16:45
Generate a TLE for an object above the horizon for a given observer and a given time
#!/usr/bin/env python3
import ephem
import datetime
import math
# Compute checksum
def set_checksum(line):
s = 0
for c in line[:-1]:
if c.isdigit():
#
# Assume white phase noise sampled at 1 MS/s
# visualize what happens when we decimate 10x six times to 1 S/s
#
import allantools as at
import numpy
import matplotlib.pyplot as plt
import scipy
# simulated data
@darksidelemm
darksidelemm / STRF_Setup.md
Last active December 2, 2023 02:27
Setting up STRF Capture & Processing

Setting up STRF Data Capture & Processing

Author: Mark Jessop (VK5QI) vk5qi@rfhead.net

This guide provides information on how to capture FFT data using the strf toolset, process it to look for satellite signals, and finally compare their doppler shift against TLEs from the SpaceTrack database. This can help with resolving the 'TLE lottery' after new launches, or cataloguing transmissions from spacecraft already in orbit.

It should be noted that the analysis described in this document is but a small subset of what the strf tools are capable of! Scott Tilley has a post describing some of the history behind strf and giving a crash course on the relationship between orbital dynamics and the doppler effect here: https://skyriddles.wordpress.com/2019/01/04/basic-orbital-dynamics/

The target platform is Debian-based distributions (e.g. Debian, Raspbian, Ubuntu), but should be applicable to other Linux-based platforms. The data processing software (rfplot and rffit) is also k

@cbassa
cbassa / rtl_capture.sh
Last active November 22, 2021 16:45
Capture spectra with STRF and an RLT SDR
#!/bin/bash
# Settings
SKY_FREQ=2242.5e6
LO_FREQ=1833e6
RATE=1e6
OUTPUT=${HOME}/satobs
FIFO=${HOME}/satobs/fifo
GAIN=30
@raziele
raziele / install_gnuradio.sh
Created December 14, 2019 22:17
A script to download and install GnuRadio 3.8 on MacOS (works on Catalina)
#!/bin/bash
# This script installs gnuradio 3.8
# Assuming homebrew is installed
# TODO: also install other modules (e.g gr-osmocomm)
#
# Step 1: Install Homebrew packages
echo "Installing necessary packages from Homebrew"
BREW_PACKAGES_LIST=(
@cbassa
cbassa / cola.py
Last active November 22, 2021 16:45
Compute collisions/encounters between satellites in a catalog
#!/usr/bin/env python3
import numpy as np
from sgp4.earth_gravity import wgs84
from sgp4.io import twoline2rv
from astropy.time import Time
class TwoLineElement:
"""TLE class"""
def __init__(self, tle0, tle1, tle2):
@nanmu42
nanmu42 / openinbrowser.go
Created May 20, 2019 09:43
Golang: Open URL in Browser
func openBrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()