Skip to content

Instantly share code, notes, and snippets.

@smoser
smoser / README.md
Last active Dec 1, 2020
rpm build in lxd
View README.md
@smoser
smoser / README.md
Last active Feb 28, 2020
ssh-import-id Upstream and Ubuntu release process
View README.md

ssh-import-id Release Process

Development

  • Bugs on launchpad: Bugs are done on launchpad. upstream, ubuntu package.
  • Version Control: Using Git on launchpad. ssh-import-id
  • Pull Requests / Merge Proposals: Use launchpad merge proposals to master first. Then release to ubuntu.
  • CI: I'm not sure what C-i is in place.

Upstream Release Process

To make a new ssh-import-id upstream release.

@smoser
smoser / README.md
Created Feb 12, 2020
little endian / big endian things
View README.md

little endian conversion

I was working on gpt package in go and I didn't realize that the author had handled conversion to little endian when writing header.

I was under the impression that I had to create the header with the little endian value.

For example, the Size of a standard header is 92 bytes.

@smoser
smoser / README.md
Last active Jan 22, 2020
printer setup brother mfc9125-cn
View README.md

Printer configuration / setup

This is to configure the 'Brother MFC-9125CN' for cups.

Installation

  • get deps (needs libc6-i386 if x86_64)

    sudo apt-get install --quiet --no-install-recommends --assume-yes libc6-i386 cups avahi-daemon
    
  • Install debs (needs force if this is x86_64)

@smoser
smoser / README.md
Last active Nov 5, 2019
script and log showing dreamhost slow loads over ipv4/http
View README.md

slow cirros downloads over ipv4/http

Problem

download.cirros-cloud.net is currently experiencing extremely long load times over HTTP and ipv4.

Notes about the problem:

@smoser
smoser / README.md
Last active Oct 21, 2019
git-remote-add-centos: Add centos git repo for a package
View README.md

git-remote-add-centos: Add centos remote for a package

This simply adds a remote to https://git.centos.org/ to an existing git repo.

Usage

Usage: git-remote-add-centos [options] [source] package

   Add remote repo for packagke on git.centos.org.
@smoser
smoser / README.md
Created Jun 12, 2019
add ubuntu git as a remote to current git repo
View README.md

git-ubuntu is somewhat documented in ubuntu wiki here.

This script simply adds a git remote for a given package.

Then in the same git repo, you can have upstream and ubuntu package information easily with something like this:

$ git clone -o upstream https://git.launchpad.net/cloud-utils
$ cd cloud-utils
$ git remote-add-ubuntu -v cloud-utils
...
@smoser
smoser / README.md
Last active May 29, 2019
cronrun: run command with logging for crontab entries
View README.md

cronrun : run command in cron

I often have errors where running a command from cron wasn't the same as running it from the command line. This is a small/silly attempt to remove those descrepencies and be able to just copy and paste what was in cron and expect that is the same.

I just put cronrun in /usr/local/bin and set it executable, and then set PATH in my crontab to include /usr/local/bin.

@smoser
smoser / README.md
Last active May 29, 2019
dyndns (dynamic dns) server and client
View README.md

dyndns solution for dreamhost

This is a php service and shell client that interacts with Dreamhost's DNS API to update a dns record. I wouldn't suggest it is my best work, but it does work and has been working for me (per my logs from December of 2009 to May of 2019). So, it works.

There are probably other solutions at this point. At the point I wrote this there were not. Also, the 2-part solution here allows the service to determine the ip address of the client, so the client doesn't have to figure out its own

@smoser
smoser / README.md
Last active Jun 5, 2019
megacli raid adapter and lvm tests
View README.md