Skip to content

Instantly share code, notes, and snippets.

@meech-ward
meech-ward / notes.md
Created June 27, 2022 18:57
Deploy React App to S3 with Custom Domain notes

https://youtu.be/7djMZ5OTG_E


The bucket policy. Remember to replace sammeechward.xyz with your bucket's name:

{
    "Version": "2012-10-17",
    "Statement": [
@meech-ward
meech-ward / PhantomRead.md
Created March 24, 2021 17:12
Phantom Read MySQL
CREATE DATABASE bank;
USE bank;

CREATE TABLE accounts (
  id integer PRIMARY KEY AUTO_INCREMENT,
  `name` VARCHAR(255),
  balance DECIMAL(10,2)
);

👊 ✋ ✌️

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.
@meech-ward
meech-ward / app.js
Last active May 1, 2019 20:25
Let's Build a Temperature Sensor with a Raspberry Pi Part 1
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) + '%');
});
country=
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="wifi name"
psk="wifi password"
}
country=CA
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Lighthouse Labs"
psk="the password"
id_str="work"
}
#!/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"
class Banana {
constructor () {
this.ripeness = 0;
}
age() {
this.ripeness++;
}
report() {
#!/bin/bash
# Based on https://somesquares.org/blog/2017/10/Raspberry-Pi-router/
SSID="MY-NETWORK"
WPA_PASSPHRASE="MY-PASSPHRASE"
# Enable ssh
touch /ssh