This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* analog-read-all.js | |
* Use bonescript and node.js to read from all analog pins on a BeagleBone | |
* Found in the wild: | |
* https://groups.google.com/forum/#!msg/beagleboard/rftH6aqyR5k/n7jQbCNAL3YJ | |
*/ | |
var bb = require('./bonescript'); | |
var sys = require('util'); | |
var fs = require('fs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# orginal https://gist.github.com/lukebussey/70fe3b245c7b55fa41300670d2698e54 | |
# make file and run sudo chmod +x kill_sophos | |
# delete all files | |
sudo rm -R /Library/Sophos* | |
sudo rm -R /Library/Application\ Support/Sophos* | |
sudo rm -R /Library/Preferences/com.sophos.* | |
sudo rm /Library/LaunchDaemons/com.sophos.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://d3js.org/d3.v2.min.js?2.9.3"></script> | |
<style> | |
.link { | |
stroke: #aaa; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Convert a Google Takeout JSON file to CSV table format | |
* @author Owen Mundy owenmundy.com | |
* Note: Make sure PHP has enough memory allotted on your system to handle large strings | |
* Instructions: | |
* 1. Download PHP file and place next to your JSON file | |
* 2. Rename string pointing to your data file | |
* 3. On command line run $ php index.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# analog_test_simple.py by Owen Mundy | |
# modified from: | |
# analog_test.py - Alexander Hiam | |
# Testing analogRead() | |
# | |
# *** NOTICE *** | |
# The maximum ADC input voltage is 1.8v, | |
# applying greater voltages will likely cause | |
# permanent damage to the ADC module! | |
# |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
cmd = 'raspistill -n -t 2000' | |
cmd += time.strftime(" -o /home/pi/python_scripts/py-picam/images/p_%Y%m%d_%H%M%S") +'.jpg' | |
os.system(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
function creator(e, t, n) { | |
var r = document.createElement(n); | |
var att = document.createAttribute("style"); | |
att.value = "max-width:120px"; | |
r.setAttributeNode(att); | |
var i = document.createTextNode(t); | |
r.appendChild(i); | |
e.appendChild(r); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# analog-test-all-pins.py - Owen Mundy | |
# Print reading from each analog-in pin on a BeagleBone | |
# with a short delay between each | |
# using mrBBIO by Matt Richardson: | |
# https://github.com/mrichardson23/mrBBIO | |
# This example is in the public domain | |
from mrbbio import * | |
def setup(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# analog-test-all-pins.py - Owen Mundy | |
# Print reading from each analog-in pin on a BeagleBone | |
# with a short delay between each | |
# This example is in the public domain | |
import os,time | |
i = 1 | |
while(True): | |
os.system("cat /sys/bus/platform/devices/tsc/ain" + str(i)) |