Skip to content

Instantly share code, notes, and snippets.

View mpilosov's full-sized avatar

Michael Pilosov mpilosov

View GitHub Profile
@mpilosov
mpilosov / apache.md
Created March 19, 2018 19:11
apache_howto

(as root)

mkdir /var/www/website.com
chown $SAFEUSER:$SAFEUSER /var/www/website.com
export SAFEUSER=yourname (if $SAFEUSER is not set)

This is where you keep the contents of your website. Inside here should exist a public_html directory that will be what apache searches for.

tell apache this site is available by copying a skeleton file over with an appropriate new name

@mpilosov
mpilosov / check_gitlog_commits.sh
Created January 27, 2018 06:43
check git log for commits, act on result.
#!/bin/bash
CHECKGITLOG=$(git log | head -3 | tail -1 | awk '{print $4;}')
TODAY=$(/bin/date | awk '{print $3}')
if [ $CHECKGITLOG -ne $TODAY ] # if you didn't do it today, act accordingly:
then
echo "HEY! YOU! DO YOUR WRITING!!! (repo synced more than a day ago)"
# Do whatever else. I like send_message.py (from my messager repo):
python messager/send_message.py 917xxxxxxx att "HEY BUM. GET WRITING. NOW."
fi
@mpilosov
mpilosov / python_setup.md
Last active October 27, 2019 04:04
Setting up Anaconda as a package manager, adding kernels to Jupyter.

How to Install Conda (a package manager)

Go download it from https://www.anaconda.com/download/ for your Linux/Windows/OSX

I like to use

wget http://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh

@mpilosov
mpilosov / GettingStartedWithGRBL.md
Last active May 26, 2023 19:22
Controlling Machines with GRBL

Instructions for a machine with GRBL already on it

My machine (basically this build: https://www.thingiverse.com/thing:1514145) has GRBL 0.9 : https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.9 The documents for newer version are up there too, obviously. It would definitely be good to get v1.1 working in order to learn the process of getting it on a fresh Arduino board. I'll outline the process of how to do that in the section below this one and fill in the details as I get around to figuring them out. Here's what I do know for sure though...

Sending GCode to the Machine

You can use any number of GUIs but the premise is always the same. Once the firmware is on your board, connect it via USB, power it on, and search in your /dev/ directory for your Arduino (type that into Terminal and start typing "tty" and then hit Tab until something shows up). If you have the Arduino software, use the drop down menus to identify an address like /dev/ttyusb#### or /dev/wchusbserial#### The numbers will be u