Skip to content

Instantly share code, notes, and snippets.

@ieure
ieure / python-pep8.el
Created February 12, 2010 18:49
Run pep8.py on Python source in Emacs.
;;; python-pep8.el --- minor mode for running `pep8'
;; Copyright (c) 2009, 2010 Ian Eure <[email protected]>
;; Author: Ian Eure <[email protected]>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
@ieure
ieure / python-pylint.el
Created February 12, 2010 18:49
Run pylint on Python source in Emacs.
;;; python-pylint.el --- minor mode for running `pylint'
;; Copyright (c) 2009, 2010 Ian Eure <[email protected]>
;; Author: Ian Eure <[email protected]>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
@davisagli
davisagli / gist:2317969
Created April 6, 2012 07:42
Marmoset patching
import inspect
def marmoset_patch(func, s, r):
source = inspect.getsource(func).replace(s, r)
exec source in func.func_globals
func.func_code = func.func_globals[func.__name__].func_code
def foo():
print 1
print 2
@plusk01
plusk01 / edison-uboot-sd.md
Last active March 10, 2020 22:15
Researching how to do U-Boot OTA using the external SD card on the Intel Edison

Intel Edison OTA w/ SD Card

This Gist attempts to document the research and (hopefully) steps to successfully allowing U-Boot to perform an OTA (over-the-air) update.

Please comment with corrections and suggestions!

Performing an OTA Update: Place the contents of the toFlash directory onto the update partition of the Intel Edison. Then, at the U-Boot prompt run do_ota. Or, if the system is running in multi-user mode, run as root: reboot ota.

Motivation: Currently (Yocto 2.1, Intel Edison) has an update partition of ~800MB. The Yocto toFlash directory is ~500MB, so placing it on to the update partition is no problem, allowing an OTA update through U-Boot. However, to do an OTA update using Emutex Labs' Ubilinxu is currently impossible as the Ubilinux toFlash directory is ~1.6GB.

@andy-shev
andy-shev / prepare-u-boot.sh
Last active February 21, 2019 15:42
Create U-Boot image suitable for xFSTK and DFU for Intel Edison
#!/bin/sh
#
# Required: xz, crc32, xxd, xfst-dldr-solo, dfu-util
#
# Version for stable edison-v2016.11 and edison-v2017.01
#dd if=u-boot.bin of=u-boot-4k.bin bs=4k seek=1 && truncate -s %4096 u-boot-4k.bin
# OSIP header (0x000000)