Instantly share code, notes, and snippets.

View install_latest_php_raspberrypi.sh
#!/bin/bash
# credits: http://stackoverflow.com/questions/31280912/how-to-install-php-5-6-on-raspbian-wheezy
### VARIABLES ###
# type here the specific php 5.x version you want to install
PHP_VERSION="5.6.27"
### SCRIPT ###
View imatic.js
#
# NodeJs code for controlling
# SainSmart iMatic with RJ45 Interface
#
var net = require("net");
var client = new net.Socket();
client.connect(30000, '192.168.1.4', function() {
console.log('connected to iMatic!');
});
View gist:1591cf9305734812baad
#
# link: https://gist.githubusercontent.com/celly/1591cf9305734812baad/raw/
#
# Add to you /usr/local/bin/gravity.sh file under sources=
#
# samsung 'smart tv'
127.0.0.1 log-1.samsungacr.com
127.0.0.1 log-2.samsungacr.com
127.0.0.1 notice.samsungcloudsolution.com
View gist:c4ea2ebc2957059c138e
Found in this post: https://www.reddit.com/r/PrintrBot/comments/3jm8bc/start_gcode_does_not_extrudeandmove_but_the_code/
Use this to reset, center, and auto-extrudea small bit before printing.
G90 ; Explicitly force absolute positioning in case it was not reset previously.
G28 ; Home all axes.
G29 ; Auto-level the bed.
G0 X0 Y0 Z0.15 F9000 ; Move to the front-left part of the bed.
M109 S{print_temperature} ; Set and wait for extruder temperature.
G92 E0 ; Zero the extruder.
View fix_edison.md

I accidently ran an 'opkg upgrade' and it destroyed my intel edison. If you still have wifi, or a console, these are the steps needed to restore it:

mkdir /update
mkfs.vfat -F32 -I /dev/mmcblk0p9
mount -t vfat /dev/mmcblk0p9 /update/
cd /update
wget http://downloadmirror.intel.com/25384/eng/edison-iotdk-image-280915.zip
unzip edison-iotdk-image-280915.zip -d .
rm edison-iotdk-image-280915.zip