Browsed by
Category: programming

Foscam FI9821P config in zoneminder 1.32.3

Foscam FI9821P config in zoneminder 1.32.3

To configure a Foscam FI9821P in the most recent zoneminder v1.32.3, use the following parameters in the source config:

source: rtsp://<user>:<pass>@<ip>:<port>/videoMain
method:tcp
color: 32
width 1280
height 720

These params allowed zoneminder to hook up to the camera and monitor video. There was a preset for this camera, but it did not seem to work, and the ONVIF auto-config errored out for some reason.

Getting PIT file from Galaxy S5 using Heimdall

Getting PIT file from Galaxy S5 using Heimdall

I found myself needing the PIT file from my galaxy s5 g900t the other day. Mainline heimdall has a bug that caused me to not be able to get it. I resolved the bug in a branch of heimdall that I put on github here

Download my branch and build it, following the build instructions, and you too can finally print your pit from the S5.

If you have any questions, post them in the comments!

Getting TNT to work in Minecraft Pi edition.

Getting TNT to work in Minecraft Pi edition.

Here are some steps to get the TNT to work in Minecraft Pi edition.

  1. Copy the following code block into a file called “tnt.py”. Save the file anywhere you want
  2. Start Minecraft pi edition and enter an environment instance.
  3. Start lxTerm or whatever terminal program you like to use
  4. cd to the directory where you saved the tnt.py file.
  5. execute ‘chmod 777 tnt.py’ to change the file runnable permissions.
  6. execute ‘python ./tnt.py’.
  7. switch back to minecraft
  8. place a block of TNT
  9. right-click on the block
  10. your console should report something like “block data is now 1”
  11. left click the block with your pick 1 time.
  12. big badaboom.


import mcpi.minecraft
import time

mc = mcpi.minecraft.Minecraft.create();

while True:
hits = mc.events.pollBlockHits()
for hit in hits:
block = mc.getBlockWithData(hit.pos.x, hit.pos.y, hit.pos.z);
block.data = (block.data + 1) & 0xf;
mc.setBlock(hit.pos.x, hit.pos.y, hit.pos.z, block.id, block.data)
mc.postToChat("Block data is now " + str(block.data))
time.sleep(0.1)