Skip to content

Instantly share code, notes, and snippets.

View mivade's full-sized avatar
👋

Mike DePalatis mivade

👋
View GitHub Profile
@mivade
mivade / paultrap.py
Last active August 29, 2015 13:56
Moving over the paultrap repository to be a gist since it was only one file anyway.
"""paultrap.py - Provides a simple object for calculating stability
boundaries for a linear Paul trap.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
"""USBTMC pipe script
This script is used to pipe commands and queries to and from a USBTMC
device and is intended to be run using the following socat command::
socat tcp-listen:5025,fork,reuseaddr,crnl,tcpwrap=script\
EXEC:"python usbtmc_pipe.py",su-d=pi,pty,echo=0
"""
@mivade
mivade / .gitignore
Last active August 29, 2015 14:06
nmapy - Simple web frontend to nmap
*~
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
@mivade
mivade / recovery_notes.md
Last active August 29, 2015 14:06
Recovery Notes

Recovering from a disk failure

This gist contains notes on what to do when needing to recover from a disk failure. A good tool to use is the SystemRescueCd live image which includes all the useful tools for performing recovery operations.

Booting to a USB disk from grub

If for whatever reason you can't boot from a USB disk with the BIOS, then you can still use grub. Simply do

set root=(hd1)
@mivade
mivade / sphinx.rst
Created September 23, 2014 07:43
Sphinx notes

Sphinx notes

Standard extensions

Usually, the numpydoc format is the easiest to use and read for docstrings. In order to make things Just Work, use the following in conf.py:

@mivade
mivade / tmux.md
Created October 16, 2015 11:43
tmux notes

tmux notes

Reattaching when verisons don't match

$ tmux attach
protocol version mismatch (client 7, server 6)

#$^#^# what now?? Aha...

Locations for Gnome settings:

~/.gconf
~/.local/share/gnome-shell
~/.config/dconf

Probably don't want to copy over ~/.local/share/gnome-shell/application_state.

@mivade
mivade / #react-chartjs-README.md
Last active January 3, 2016 14:27
react-chartjs

react-chartjs tests

Nothing special, just playing around with react-chartjs and jspm.

@mivade
mivade / pyqtornado.py
Last active April 11, 2016 03:18
PyQt with Tornado
"""Demonstration of combining the Qt and Tornado event loops."""
from PyQt4 import QtGui, QtCore
from tornado.ioloop import IOLoop
from tornado import gen
from tornado.httpclient import AsyncHTTPClient
URL = "https://www.random.org/integers/?num=1&min=100&max=999&col=1&base=10&format=plain&rnd=new"
class MainWindow(QtGui.QMainWindow):
@mivade
mivade / slides.md
Created September 14, 2016 12:49 — forked from aaronwolen/slides.md
Pandoc template to generate reveal.js slideshows.

% Title % Name % Date

My first slide

List