Skip to content

Instantly share code, notes, and snippets.

View Clonkex's full-sized avatar

David Clonkex

View GitHub Profile
@sidward35
sidward35 / instructions.md
Last active April 19, 2024 21:04
Using a PS3 EyeToy with the Raspberry Pi

Having heard about the new camera driver built into the kernel of the new Raspbian OS image, I decided to have a play, using my PS3 EyeToy camera. The steps below are based on this forum thread, with some changes to reflect my own experience. The Raspberry Pi supports a number of cameras, not just the EyeToy, so if you have a spare one lying around, give it a go.

  1. Install the ‘motion’package:sudo apt-get install motion
  • This should automatically install the required ‘ffmpeg’ package – if not you can just do sudo apt-get install ffmpeg.
  1. Edit the config file:sudo nano /etc/motion/motion.conf
  • To enable daemon mode (so you can run the software in the background without it tying up your terminal):daemon on
@MattRix
MattRix / PhysicsFollower.cs
Last active May 7, 2024 09:06
A thing you can use to make a rigidbody move towards a position reliably
using UnityEngine;
using System.Collections;
using System;
[RequireComponent (typeof(Rigidbody))]
public class PhysicsFollower : MonoBehaviour
{
public Transform target;
Rigidbody rb;
@angularsen
angularsen / MarginSetter.cs
Created January 17, 2015 12:19
WPF - Automatic horizontal or vertical spacing in StackPanel and other list like panels
using System.Windows;
using System.Windows.Controls;
using JetBrains.Annotations;
namespace Foo
{
public class MarginSetter
{
private static Thickness GetLastItemMargin(Panel obj)
{