Skip to content

Instantly share code, notes, and snippets.

Sam Meech-Ward meech-ward

Block or report user

Report or block meech-ward

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wpa_supplicant.conf
country=
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="wifi name"
psk="wifi password"
}
View wpa_supplicant.conf
country=CA
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Lighthouse Labs"
psk="the password"
id_str="work"
}
View start-pi-camera-secure.sh
#!/bin/bash
# Make sure the NODE_MEDIA_PRIVATE_KEY environment variable is set
if [ -z ${NODE_MEDIA_PRIVATE_KEY+x} ]; then
echo "Make sure you set the NODE_MEDIA_PRIVATE_KEY is set";
exit -1;
fi
PI_IP_ADDRESS="192.168.1.71"
SERVER_IP_ADDRESS="192.168.1.71"
@meech-ward
meech-ward / app.js
Last active May 1, 2019
Let's Build a Temperature Sensor with a Raspberry Pi Part 1
View app.js
const sensor = require('node-dht-sensor');
sensor.read(22, 4, function(err, temperature, humidity) {
if (err) {
console.log("AHHHHHHHH error", err);
return;
}
console.log('temp: ' + temperature.toFixed(1) + '°C, ' + 'humidity: ' + humidity.toFixed(1) + '%');
});
View banana.js
class Banana {
constructor () {
this.ripeness = 0;
}
age() {
this.ripeness++;
}
report() {
View raspi-access-point.sh
#!/bin/bash
# Based on https://somesquares.org/blog/2017/10/Raspberry-Pi-router/
SSID="MY-NETWORK"
WPA_PASSPHRASE="MY-PASSPHRASE"
# Enable ssh
touch /ssh
View RPS.md

👊 ✌️

You are going to create a very simple rock paper scissors game. It will consist of three buttons, one for each of the moves you can play. Tap on one of these buttons to chose your move, then the iPhone will randomly choose a move and a you either win, lose, or 👔.

Screenshot of app

Rules of Rock Paper Scissors:

  • Each sign can beat one (and only one) other:
  • Rock smashes scissors.
View pointers-and-functions.c
#include <stdio.h>
int squaringNumber(int num) {
int square = num * num;
return square;
}
void squareNumber(int *numberReference) {
int num = *numberReference;
int square = num * num;
You can’t perform that action at this time.