Skip to content

Instantly share code, notes, and snippets.

View lanefu's full-sized avatar
🏅
outstanding achievement in the field of excellence

lanefu

🏅
outstanding achievement in the field of excellence
View GitHub Profile
@lanefu
lanefu / yumUpdateBashAndTestShellshock.yml
Created September 25, 2014 19:57
Simple Ansible playbook to update bash and test for Shellshock vulnerability on yum-based boxes
---
- hosts: [ 'all', '{{cli_target}}' ]
tasks:
- name: clean yum
command: yum clean all
tags: cleanyum
- name: update bash
yum: name=bash state=latest
@lanefu
lanefu / OrangePIPythonWiringPIBuild.md
Last active October 15, 2020 04:04
How to get wiring Pi Python libraries on Orange PI with armbian

Overview

Use my fork of the Wiring-Pi Python library which checks out the WiringOP fork of the WiringPi library as a submodule to build everything. yes that's a little confusing

The WiringPI library is the original C library that RaspGPIO is somewhat based on. WiringPi was built to replicate arduino GPIO functions

In Raspberry Pi Land there are 2 normal python paths for GPIO. One is Raspi.GPIO and the other is WiringPI

Known Success

@lanefu
lanefu / espressobin_armbian_wip_howto.md
Last active September 30, 2020 12:16
Quick notes and howto for building and installing Armbian for espressobin

Espressobin

I haven't tried mainline kernel. just 4.4.x. Seems to work with Xenial and Jessie

pre-flight

make note of the MAC addresseses on the switch ports.. the 2 close together will be LAN1 and LAN2 in the OS. eth1addr and ethaddr2 in u-boot. The 3rd address will be for WAN in the OS aka ethaddr in u-boot

the WAN port is in-line with the SDcard slot on the board.... use that as your primary NIC for now.

building

Use my branch, or hopefully igor's once my merge request has been added. Standard armbian building expertise applies.

@lanefu
lanefu / OrangePI FAQ.md
Last active November 13, 2017 14:12
Orange Pi FAQ

This covers the most critical questions for new orange pi users

Q: I just got an Orange Pi. What should I install?

A: install Armbian

Q: I want to do XYZ with my Orange Pi, where shoud I start?

A: install Armbian

@lanefu
lanefu / EdgeOSUpdateHostsBulk.sh
Last active January 17, 2020 03:44
Bulk Insert of active EdgeOS dhcp leases into /etc/hosts aka regenerate entries in /etc/hosts
## do this before hand
## vyatta will try to eval show under the wrong circumstances
show dhcp leases > /tmp/leases.txt
### dump below in a file, execute with bash
MY_INTERNAL_DOMAIN=your_internal_domain.local
IFS=$'\n'
for line in $(printf "$(cat /tmp/leases.txt|tail -n +3|awk '{print $6, $1, $2}')")
do
@lanefu
lanefu / ArmbianBuilderVyOSPackages.md
Last active July 29, 2023 11:50
Getting Armbian Builder to assemble VyOS packages

vyos for armbian

update

I gave up. vyos docker + maclan looks much more managable

steps to implementaiton

  1. checkout vyos build
  2. checkout all submodules
@lanefu
lanefu / armbian-espressobin-no-br0.md
Last active November 19, 2021 22:09
armbian espressobin bridgeless networking

bwaaaah eliminate hairpinning to cpu and just use wan link

This will eliminate bridge networking, and move DHCP explicity to the WAN interface (port next to usb3) on the espressobin. Approach can be applied to the lan interfaces as well

caveat: TODO: need to double check mac addresses are probaly assigned to the interfaces and not just duplicating eth0 This involves setting MACs correctly in u-boot environment

fix services

systemctl disable NetworkManager
@lanefu
lanefu / checkcgrouprams.sh
Created March 12, 2019 18:27
watch cgroup memory
#!/bin/bash
cd /sys/fs/cgroup/memory
while [[ /bin/true ]];do
date
for item in $(ls memory.*usage*); do echo $item $(echo echo $(echo $(cat $item) /1024/1024 |bc))M;done
echo "container count $(docker ps -a|wc -l)"
echo
sleep 10s
done
@lanefu
lanefu / wled_d1_mini_lite.md
Last active November 30, 2019 17:02
Flash WLED on D1 mini lite

I've been using the 1MB D1 Mini lite clones with WLED..... it's been a bit of a challenge to get them to flash properly. Especially when compling my own build of the firmware

esphomeflasher defaults to using the qio method. DOUT seems to work..

how to flash manually

esptool --port /dev/ttyUSB0 write_flash --flash_mode dout --flash_size 1MB 0x000 esp01_1m/firmware.bin

1MB warning

@lanefu
lanefu / test-embedded.md
Last active February 9, 2020 01:38
testing embedded thing

Build Status

Build Status