Skip to content

Instantly share code, notes, and snippets.

FROM ubuntu:24.04
# Install Prerequisites
RUN apt update \
&& apt upgrade -y \
&& apt install -y curl
# Install DotNet SDK
RUN curl https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
@ahokinson
ahokinson / ferment
Created October 10, 2023 19:09
desirable change to a beverage
#!/usr/bin/env bash
set -e
brew update
brew upgrade
brew cleanup
brew doctor
#include <Arduino.h>
struct State {
int previous;
int current;
};
class Button {
public:
explicit Button(int);
@ahokinson
ahokinson / fields.py
Created November 8, 2018 16:46
Adding filters with requirements to Graphene and SQLAlchemy.
from graphene import Connection
from graphene_sqlalchemy import SQLAlchemyConnectionField
from database.graphql.filters import filter_argument_for_model, Filter
class SQLAlchemyFilteredConnectionField(SQLAlchemyConnectionField):
def __init__(self, type, *args, **kwargs):
if "filter" not in kwargs and issubclass(type, Connection):
try:
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace Gubbins.Editor
{
public class Selections
{
[MenuItem("Tools/Gubbins/Selections/Objects with Missing Scripts")]
public static void SelectMissing()
using UnityEngine;
namespace Gubbins.Assertions
{
public static class Assert
{
public static void AssignIfNull<T>(ref T value) where T : Object
{
if (value != null) return;
using UnityEngine;
public class SingletonBehaviour<T> : MonoBehaviour where T : MonoBehaviour
{
protected static T s_instance = null;
public static T Instance
{
get
{
if (s_instance == null)