Skip to content

Instantly share code, notes, and snippets.

View jasonehines's full-sized avatar

Jason Hines jasonehines

View GitHub Profile
@jasonehines
jasonehines / printer.conf
Created August 12, 2021 01:34
Ender 3 Pro Creality 4.2.7 with bltouch - Klipper printer Configuration
# This file contains pin mappings for the Creality "v4.2.7" board. To
# use this config, during "make menuconfig" select the STM32F103 with
# a "28KiB bootloader" and serial (on USART1 PA10/PA9) communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC

Keybase proof

I hereby claim:

  • I am jasonehines on github.
  • I am jasonehines (https://keybase.io/jasonehines) on keybase.
  • I have a public key ASD2DEa8O4N4WduhBxs2-UpZzhXsXBDf0POtveHltgAspwo

To claim this, I am signing this object:

@jasonehines
jasonehines / remove_duplicate_lines.sh
Created June 3, 2019 20:12
Remove duplicate lines preserving order #awk #shell
# https://iridakos.com/how-to/2019/05/16/remove-duplicate-lines-preserving-order-linux.html
awk '!visited[$0]++' your_file > deduplicated_file
@jasonehines
jasonehines / README.md
Last active February 6, 2023 23:02 — forked from Jachimo/README.md
Using ZeroTier to route between two UniFi USG LANs

Routing between two UniFi USG based LANs with ZeroTier

Intro

This is a quick explanation of how to configure both ZeroTier and two Ubiquiti UniFi USGs to allow routing between two IPv4 networks. Both networks are in private (RFC1918) address space and each one has its own DHCP service. There is no need for NAT between them, only IP routing.

The two networks are 192.168.1.0/24 (call this the "left" network) and 192.168.10.0/24 (the "right" network) but they can be anything. Also, you can have multiple CIDR blocks on one side or the other of the ZeroTier route; if you do, you just have to create more routing table entries.

@jasonehines
jasonehines / .s3cfg
Last active March 9, 2020 20:46
Digital Ocean Spaces s3cmd configuration example
[default]
access_key = #replace with your DO key
access_token =
add_encoding_exts =
add_headers =
bucket_location = nyc3
ca_certs_file =
cache_file =
check_ssl_certificate = True
check_ssl_hostname = True
@jasonehines
jasonehines / DO_s3fs_example.txt
Last active November 28, 2022 08:21
Digital Ocean Spaces s3fs example
s3fs hinesnetwork /mnt/hinesnetwork.nyc3.digitaloceanspaces.com -o passwd_file=/etc/passwd-s3fs -o url=https://nyc3.digitaloceanspaces.com -o endpoint=nyc3 -d -d -f -o f2 -o curldbg

Solus packaging cheat sheet

Setup

Install required packages

  • sudo eopkg install -c system.devel
  • sudo eopkg install git solbuild
  • sudo eopkg install solbuild-config-unstable

Create repository directory

  • mkdir ~/repository
#how to install tinc
sudo eopkg install -c system.devel
sudo eopkg install lzo-devel git
mkdir Source
cd Source
git clone https://github.com/gsliepen/tinc.git
cd tinc
autoreconf --install
./configure
sudo make install
GNU nano 2.5.3 File: /usr/local/bin/greeting.py
#!/usr/bin/python
from websocket import create_connection
ws = create_connection("ws://localhost:8000/events/ws")
ws.send('{"message_type": "speak", "context": null, "metadata": {"utterance": "Welcome back Jason"}}')
result = ws.recv()
ws.close()
@jasonehines
jasonehines / re
Created April 3, 2016 17:57
Find and rename file
# find file in current directory and rename some_file_name to end in .old
find . -iname *some_file_name* -exec mv {} {}.old \;
# find file in directory starting with rc and rename to end in .old
find .rc* -iname *some_file_name* -exec mv {} {}.old \;