Skip to content

Instantly share code, notes, and snippets.

@postcert
postcert / 01_readme.md
Last active February 23, 2025 19:57
nixos overlay: include ddcutil in powerdevil build

Directions

  1. Toss the overlay somewhere
  2. Add in your overlay reference
  3. sudo nixos-rebuild switch --upgrade

Why

Just seems like ddcutil isn't required in the build environment and it explicitly called out in the maintainer scripts Put a pin to see later but for now "this works"

Other

@postcert
postcert / flake.nix
Created June 16, 2024 17:23
Godot + RL Agent flake.nix
{
# Source: https://github.com/Revolutionary-Games/Thrive/blob/master/flake.nix
# Godot 4 Mono was not in nixpkgs 6/6/24
description = "Flake for Godot 4.2.2 + rlagents";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
# PR for godot4-mono 4.2.1 https://github.com/NixOS/nixpkgs/pull/285941
@postcert
postcert / py_flask_ex.py
Created November 26, 2018 15:48
simple python flask healthcheck toggler
from flask import Flask, jsonify
app = Flask(__name__)
health_status = True
@app.route('/toggle')
def toggle():
global health_status
health_status = not health_status
@postcert
postcert / algo_downloader.py
Last active October 30, 2018 14:13
algo_downloader
import wget
import argparse
import os
# example image url
# http://cinemath.archimedean.org/drkafkoulis/CineMath_TheoryOfAlgorithmsU02/wwwTheoryOfAlgorithmsU02/SRC/TheoryOfAlgorithmsU02L13SRC/page_3.jpg
# example video url
# http://cinemath.archimedean.org/drkafkoulis/CineMath_TheoryOfAlgorithmsU02/TheoryOfAlgorithmsU02L12.mov
image_url = 'http://cinemath.archimedean.org/drkafkoulis/CineMath_TheoryOfAlgorithmsU{section:02d}/wwwTheoryOfAlgorithmsU{section:02d}/SRC/TheoryOfAlgorithmsU{section:02d}L{lesson}SRC/page_{page_number}.jpg'
image_filename = 'U{section:02d}_L{lesson:02d}_P{page_number}.jpg'
### Keybase proof
I hereby claim:
* I am postcert on github.
* I am postcert (https://keybase.io/postcert) on keybase.
* I have a public key whose fingerprint is 804D BF70 7D37 2786 35D1 A382 1739 D731 83BB 0168
To claim this, I am signing this object:
@postcert
postcert / gist:225e69f56baa27ff643c
Last active August 29, 2015 14:04
ass sanser return of sass
*****************
USING 31 and 31
1265ms (me)
2169ms (Java)
1251310 1251310
0=780361
1=316145
2=188875
3=95700
4=40551
//
// main.c
// genesort
//
// Created by Daniel on 7/20/14.
// Copyright (c) 2014 daniel. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
/*********************************************************************
Author : David Vizcaino
Course : COP 4338 - Programming 3
Professor : Michael Robinson
Program : Program 3, Creates two reports displayed in straight columns
Due Date : 07/07/2014
Certification:
I hereby certify that this work is my own and none of it is the work of any other person.
@postcert
postcert / robinsoooon
Last active August 29, 2015 14:03 — forked from ZerolinK/robinsoooon
/*********************************************************************
Author : David Vizcaino
Course : COP 4338 - Programming 3
Professor : Michael Robinson
Program : Program 3, Creates two reports displayed in straight columns
Due Date : 07/07/2014
Certification:
I hereby certify that this work is my own and none of it is the work of any other person.
/*********************************************************************
Author : David Vizcaino
Course : COP 4338 - Programming 3
Professor : Michael Robinson
Program : Program 3, Creates two reports displayed in straight columns
Due Date : 07/07/2014
Certification:
I hereby certify that this work is my own and none of it is the work of any other person.