Skip to content

Instantly share code, notes, and snippets.

@cfobel
cfobel / Transfer benchmark.ipynb
Created June 18, 2015 15:38
Arduino RPC transfer benchmark
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfobel
cfobel / leonardo-1.0.5.md
Last active August 29, 2015 14:24
Arduino configs
  • runtime
    • ide
      • path : c:\arduino-1.6.5-r2
      • version : 1_6_5
  • name : Arduino Leonardo
  • vid
    • 1 : 0x2341
    • 0 : 0x2341
    • 3 : 0x2A03
    • 2 : 0x2A03
@cfobel
cfobel / LICENSE
Last active March 19, 2021 14:55
color palette
Copyright (c) 2021 Christian Fobel
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@cfobel
cfobel / video_mode_selector_demo.py
Created March 9, 2016 20:05
Demo usage of pygst_utils.video_view.mode.VideoModeSelector
import gtk
from pygst_utils.video_view.mode import VideoModeSelector
# Run with `ipython -i video_mode_selector_demo.py`
selector = VideoModeSelector()
selector.show_and_run()
# Press <ctrl>+c to drop back to IPython prompt.
checkbox = gtk.CheckButton()
selector.widget.add(checkbox)
@cfobel
cfobel / janus.plugin.streaming.cfg
Last active March 27, 2023 22:50
WebRTC Stream Logitech C920 through Janus gateway
; /opt/janus/etc/janus/janus.plugin.streaming.cfg
; [stream-name]
; type = rtp|live|ondemand|rtsp
; rtp = stream originated by an external tool (e.g., gstreamer or
; ffmpeg) and sent to the plugin via RTP
; live = local file streamed live to multiple listeners
; (multiple listeners = same streaming context)
; ondemand = local file streamed on-demand to a single listener
; (multiple listeners = different streaming contexts)
; rtsp = stream originated by an external RTSP feed (only
# See also [here][1].
#
# [1]: http://robot-framework.readthedocs.io/en/latest/_modules/robot/utils/dotdict.html
class DotOrderedDict(OrderedDict):
def __getattr__(self, attr):
try:
result = super(DotOrderedDict, self).__getattribute__(attr)
return result
except AttributeError:
@cfobel
cfobel / Matplotlib interactive image example.ipynb
Last active February 7, 2018 13:30
Matplotlib interactive image example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfobel
cfobel / isolate_selected_objects.FCMacro
Created July 20, 2017 14:01
FreeCAD macros for showing all parts (not sketches or drafts); isolating view of selected objects
# Isolate selected item(s):
# - Save list of selected items
# - Save list of visible items
# - Hide non-selected items that are currently visible
import FreeCAD
selected_objects = set(object_i.Label for object_i in Gui.Selection.getSelection())
objects_by_label = {object_i.Label: object_i for object_i in Gui.ActiveDocument.Document.Objects if object_i.ViewObject.Visibility}
[setattr(object_i.ViewObject, 'Visibility', False) for label_i, object_i in objects_by_label.iteritems()]
[setattr(object_i.ViewObject, 'Visibility', True) for object_i in Gui.ActiveDocument.Document.Objects if object_i.Label in selected_objects]
@cfobel
cfobel / error.markdown
Created September 19, 2017 20:36
Error building `nodejs-feedstock` recipe for Node 8.2.1

Error building nodejs-feedstock recipe for Node 8.2.1:

1505844854503\work\node-v
8.2.1\cctest.vcxproj]
C:\bld\nodejs_1505844854503\work\node-v8.2.1\deps\v8\include\v8-inspector.h(80): warning C4251: 'v8_inspector::V8ContextInfo::context': class 'v8::Local<v8::C
ontext>' needs to have dll-interface to be used by clients of class 'v8_inspector::V8ContextInfo' (compiling source file src\inspector_io.cc)c:\bld\nodejs_150
5844854503\work\node-v8.2.1\src\base64.h(76): warning C4003: not enough actual parameters for macro 'V' (compiling source file src\inspector_socket.cc) [C:\bl
d\nodejs_1505844854503\work\node-v8.2.1\cctest.vcxproj]
@cfobel
cfobel / Ragel build.md
Created February 15, 2018 22:24
Ragel build instructions