Skip to content

Instantly share code, notes, and snippets.

@skhameneh
skhameneh / main.cpp
Last active May 29, 2020 18:29
ESP32 Websocket Servo Demo
#include <WiFi.h>
#include <WiFiMulti.h>
#include <WebSocketsClient.h> // WebSockets by Markus Sattler
#include <Servo.h> // ServoESP32 by Jaroslav Paral
static const int servoPin = 17;
/* settings.h
char ssid[] = "wifi_name";
char pass[] = "wifi_password";
@skhameneh
skhameneh / setup.sh
Created September 7, 2018 05:33
setup
#/bin/bash
clear
cd ~
# Check for systemd
systemctl --version >/dev/null 2>&1 || { echo "systemd is required. Are you using Ubuntu 16.04?" >&2; exit 1; }
swap_size="4G"
@skhameneh
skhameneh / docker-compose.yml
Last active April 8, 2018 10:51
Mastodon Compose Progress
version: '2'
services:
db:
restart: always
image: postgres:alpine
redis:
restart: always
image: redis:alpine
mastodon:
stdin_open: true
@skhameneh
skhameneh / Vagrantfile
Last active January 21, 2017 00:37
react-dallas-go-starter-kit
# -*- mode: ruby -*-
# vi: set ft=ruby :
$setupScript = <<SCRIPT
GO_VERSION=1.7.4
echo "Downloading go$GO_VERSION.linux-amd64.tar.gz"
wget http://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz >/dev/null 2>&1
echo 'Extracting go'
>>>G29
SENDING:G29
gcode_G29 >>>
G29 Auto Bed Leveling
deploy_z_probe > current_position: (0.00, 0.00, 286.20)
prepare_move_raw > destination: (0.00, 0.00, 286.20)
reset_bed_level
enable_endstops(true)
z_before = (before) 15.00
z_before = (before) 15.00