Skip to content

Instantly share code, notes, and snippets.

Scott Moser smoser

  • Cisco
  • US
Block or report user

Report or block smoser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@smoser
smoser / README.md
Last active May 21, 2020
build-upstream-pkg build a package from upstream source
View README.md

build-upstream-pkg

Usage: build-upstream-pkg [ options ] <<ARGUMENTS>>

   build-upstream-pkg <upstream-commitish> <packaging-commitish>

   options:
      --version  VERSION    make the upstream version VERSION
                            default is to use git-describe
      --output   DIR        put created files in DIR
@smoser
smoser / README.md
Last active May 21, 2020
bash version of lxc-usernsexec
View README.md

bash version of lxc-usernsexec

I was in need of something like lxc-usernsexec but ran into some issues lxc/#3420 using it (possibly user error). I put together a test case testing what I thought were valid invocations of lxc-usernsexec. That is here as test-usernsexec.

I looked at the implementation and came up with the bash version here ias 'usernsexec'. My version passes the test case.

My version doesn't get tty's for the executed command.

@smoser
smoser / README.md
Created May 18, 2020
ubuntu email setup through dreamhost relay with msmtp
View README.md

usage of msmtp for email relay through dreamhost

I just needed the sendmail cli interface to work for things like bts or the occasional sending of an email.

msmtp seems like a good solution.

Heres what I did to get it functional

  • install mtsmtp-mta
@smoser
smoser / README.md
Last active Apr 27, 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
...
You can’t perform that action at this time.