Skip to content

Instantly share code, notes, and snippets.

@scottyob
scottyob / rePoem.txt
Created January 24, 2013 12:51
Re: Valentines Day Poem
I want to share a story, I'll tell you for free.
a story of us guys, guys working in I.T.
they go by many names; dweebs, geeks and dorks,
some even get their kicks from github forks.
But let's be honest, it's hard when you're a nerd,
a little awkward, running with a different herd.
it's not that we're scared and full of fears,
but to share our interests would bring you to tears.
@scottyob
scottyob / models.py
Created May 29, 2013 12:38
Playing with the idea of bidirectional relations between patch panels
from django.db import models
# Create your models here.
class PatchPanel(models.Model):
"""
Represents a physical patch panel. This could be a FOBOT or a Krone frame. Whatever really
"""
name = models.CharField(max_length=100, null=False, blank=True, unique=True, help_text="The name used to identify the panel. (Eg. B15 PABX Panel K)")
outlets = models.IntegerField(help_text="The number of outlets on the panel")
@scottyob
scottyob / hid-via-bluetooth.cpp
Last active September 8, 2022 09:02
Arduino Leonardo HID keyboard and mouse via Seeeduino Bluetooth Module.
/*
This code will be used as a demo to controll the mouse and keyboard from an Arduino Leonardo.
It shows an example of recieving commands from a remote Bluetooth endpoint (be it computer, mobile phone, etc) and using those commands to control
the mouse and keyboard of a locally connected USB target.
Any character that gets recieved will be typed into the keyboard, unless that character is a '#' which we will use to toggle between mouse and keyboard modes
Once in mouse mode, the following characters will be used as commands:
'u': Move the mouse up
'd': Move the mouse down
"""
Prints out a list of overlapping/duplicate IP addresses
"""
import os
import sys
import cPickle as pickle
import heapq
import pprint
from SubnetTree import SubnetTree
+-----------+
| |
| |
| R1 |
| |
| |
+-----+-----+
|
|
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VRTK_CursorMouse : VRTK.VRTK_StraightPointerRenderer {
public Camera camera;
public Transform hand;
protected override Transform GetOrigin(bool smoothed = true) {
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK;
public class VRTK_RadialPoint : MonoBehaviour {
public VRTK_DestinationMarker pointer;
public VRTK_RadialMenuController radialController;
public const int angle_offset = 90;
@scottyob
scottyob / Apple-Wireless-Keyboard.kbd.json
Created March 22, 2021 05:05
Apple Wireless Keyboard
[
{
"backcolor": "#dbdbdb",
"name": "Apple Wireless Keyboard",
"author": "Alistair Calder",
"radii": "6px 6px 12px 12px / 18px 18px 12px 12px"
},
[
{
"y": 0.75,
[scott@node02 cogg]$ cat map.tin
#VAR {previousRoom} {""};
#VAR {currentRoom} {""};
#NOP ---
#NOP - Either creates or go-to's the room ID seenEither creates or go-to's the room ID seenEither creates or go-to's the room ID seenEither creates or go-to's the room ID seen
#NOP --
#action {::ROOM-ID-%1::} {
#VAR {previousRoom} {$currentRoom};
#VAR {currentRoom} {%1};
// All dimensions are in mm
width = 1.5;
cubeWidth = 20;
outerWidth = cubeWidth + width;
height = 5;
difference() {
cube([outerWidth, outerWidth, height], center = true);
cube([cubeWidth, cubeWidth, 20], center = true);