Skip to content

Instantly share code, notes, and snippets.

@oakie
oakie / ExampleUsage.cs
Created May 29, 2023 16:56
Extension method which excludes any properties derived from the specified base class from being serialized into JSON.
private class ExampleA
{
public string PropertyA { get; set; } = "not wanted";
}
private class ExampleB : ExampleA
{
public string PropertyB { get; set; } = "wanted";
}
@oakie
oakie / ros-firebase-pusher.py
Created March 30, 2016 18:49
Sets up a ROS node which subscribes to the topics listed in topics.txt and pushes the messages to the corresponding firebase route.
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
from firebase import firebase as fb
import os
class Listener:
def __init__(self, topics):
@oakie
oakie / python-slideshow.py
Last active October 25, 2016 03:56
Simple python script for showing pictures from a dropbox folder in a digital picture frame.
from os import walk, path
import sys
import pygame
extensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp']
width, height = 1920, 1080
if len(sys.argv) != 2:
print 'usage: %s <path>' % sys.argv[0]
sys.exit(1)