Skip to content

Instantly share code, notes, and snippets.

View ricklon's full-sized avatar

Rick Anderson ricklon

View GitHub Profile
@jennyshane
jennyshane / Small-Raspbian-Image-for-Large-SD-Cards.md
Last active February 22, 2021 01:02
Creating a raspbian image to duplicate on large SD cards

(This is compiled from several very helpful stackexchange posts. I spent a while figuring this out, and I don't want to lose it.)

We recently needed several identical raspbian images, all with the same libraries installed, same content in the home directory and the same setup configuration.

The obvious thing to try is to just boot a base raspbian image, set it up as you want it, then remove the card from the Pi and use another machine to copy the contents of the card to create an image, then flash that image onto the other cards you have. There are two problems with this:

  1. If your SD cards are large (ours were 32G), this process becomes a bit cumbersome. Flashing the cards takes longer, creating an image from the card can take a really long time, and if you have limited space on your non-pi machine, you might not have anywhere to put a 32G image.
  2. Even if two SD cards are nominally the same size, they might not have exactly the same amount of space. This means that if you create your image from a card
@stonehippo
stonehippo / Arduino_PN532_NTAG203_dumper.ino
Last active April 2, 2021 02:29
Reading out the contents of an NTAG203 NFC tag using an Adafruit PN532 shield for Arduino. This sketch reads and prints to the serial console all 42 pages of memory on the tag.
/*
Dump the memory on a NTAG203 NFC tag using the Adafruit PN532 RFID/NFC Shield
http://www.adafruit.com/products/789
This sketch requires the installation of the Adafruit I2C library for the shield,
which can be found at https://github.com/adafruit/Adafruit_NFCShield_I2C
The datasheet and other info for the NTAG203 can be found at
http://www.nxp.com/products/identification_and_security/smart_label_and_tag_ics/ntag/series/NTAG203.html
@zeffii
zeffii / mat_dicts.py
Created September 30, 2012 19:55
storing material as dicts
# cool_mat must be present in current_blend
# this script is written to deal with only one specific material
# i'm looking at a way to write a generic cycles json exporter
import bpy
material_name = 'cool_mat'
materials = bpy.data.materials
nodes = materials[material_name].node_tree.nodes
links = materials[material_name].node_tree.links