Skip to content

Instantly share code, notes, and snippets.

<style>
body { margin: 1em 2em }
h1 { text-decoration : underline }
div { border: 10px solid; background: #ddd }
@page { margin: 2.5cm; }
header {
position: fixed;
top: -2.5cm;
left: -2.5cm;
@cfobel
cfobel / .gitconfig
Last active November 27, 2019 17:00
Bash config
[user]
name = "Christian Fobel"
email = "christian@fobel.net"
editor = vim
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset - [%an] %s %Cgreen(%cr)%Creset %d' --abbrev-commit --date=relative
tree = log --graph --decorate --pretty=oneline --abbrev-commit
[color]
@cfobel
cfobel / MicroDrop - routes table format.ipynb
Last active September 4, 2019 17:25
MicroDrop step routes table format
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfobel
cfobel / DropBot capacitance updates.ipynb
Last active July 4, 2018 17:03
DropBot capacitance updates
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfobel
cfobel / README.md
Created June 8, 2018 11:45
pyinsane2 Windows build
@cfobel
cfobel / Ragel build.md
Created February 15, 2018 22:24
Ragel build instructions
@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 / 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 / Matplotlib interactive image example.ipynb
Last active February 7, 2018 13:30
Matplotlib interactive image example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 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: