profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/jhillyerd/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
James Hillyerd jhillyerd @google Redmond, WA, US https://twitter.com/jameshillyerd Google Cloud TSE, Go enthusiast

inbucket/inbucket 679

Disposable webmail server (similar to Mailinator) with built in SMTP, POP3, RESTful servers; no DB required.

jhillyerd/enmime 245

MIME mail encoding and decoding package for Go

inbucket/fauxmailer 7

Generate random emails, sent via SMTP

jhillyerd/flac2mp3 2

My old FLAC to MP3 script

jhillyerd/go-to-elm-json 2

Convert a Go struct to an Elm record via JSON decoder pipeline.

inbucket/demo.inbucket.org 1

GCP CoreOS config for demo.inbucket.org

jhillyerd/bluepill-exp 1

Experimenting with stm32f1xx on rust

jhillyerd/hw-cpu 1

Rust powered CPU monitor... maybe?

inbucket/inbucket.org 0

Inbucket Website

jhillyerd/3d-printer-profiles 0

My 3D printer profiles

issue commentjhillyerd/plugin-git

Fall back to main when master branch not found

Here is the logic used by Oh My Zsh to retrieve the main branch: https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh#L32-L43

jhillyerd

comment created time in 5 hours

issue commentNixOS/nixops

Release 2.0

nix-community is switched to nixopsUnstable now due to this: https://github.com/nix-community/infra/pull/57

grahamc

comment created time in 7 hours

fork y1zhou/plugin-git

Git plugin for Oh My Fish (similar to oh-my-zsh git)

fork in 12 hours

startedDidierRLopes/GamestonkTerminal

started time in 14 hours

issue commentjhillyerd/plugin-git

Fall back to main when master branch not found

I haven't scripted in fish that much, but would something like this work?

function gcom -d "checkout master and fall back to main"
  if test (git branch --format '%(refname:short)' | grep -c '^master$') -eq 0
    git checkout master
  else
    git checkout main
  end
end

Of course this doesn't cache the default branch somewhere like you mentioned. I'm not sure where you'd want that to happen -- maintain a variable that keeps track of everything, or have a hidden file somewhere that logs this? Not sure how much more efficient this is gonna be compared to running git branch again.

jhillyerd

comment created time in 14 hours

issue commentjhillyerd/enmime

Add Encode(io.Writer) method to enmime.Envelope

myEnvelope.Root.Encode() looks pretty much like the mail that I read from the file (apart from ordering of headers). It is truly equivalent?

jhillyerd

comment created time in 17 hours

issue commentjhillyerd/enmime

Add Encode(io.Writer) method to enmime.Envelope

I need to read an email from a file, manipulate it, and send it. AFAICS, this is not possible with enmime because the Envelope wouldn’t send and the Builder wouldn’t read, and there is no converter between them, right?

jhillyerd

comment created time in 17 hours

fork fatih/client_golang

Prometheus instrumentation library for Go applications

fork in 21 hours

issue openedjhillyerd/enmime

Unquoted param in Content-Type header is not automatically quoted

What I did: Tried to parse a mime file with an attachment whose file name had spaces and was unquoted in the Content-Type header.

What I expected: The package would quote the unquoted string before processing

What I got: got err mime: invalid media parameter

Release or branch I am using: master

(Please attach a sample message if you feel it will help reproduce the issue)

https://github.com/jhillyerd/enmime/pull/183 I created a failing test to replicated the issue on the above PR. Would be willing to submit a fix, however I am unsure if this is a case that this package is willing to cover.

Thanks for the great package!

created time in 21 hours

PR opened jhillyerd/enmime

Add failing test with an unquoted file name

Currently the ParseMimeType function is unable to handle the case where a param has spaces and is unquoted

+6 -0

0 comment

1 changed file

pr created time in 21 hours

fork Pritoj/enmime

MIME mail encoding and decoding package for Go

fork in a day

startedasanchez75/opencyc

started time in a day

issue closedNixOS/nixops

`nixops deploy` fails with: "/root/.nix-profile/etc/profile.d/nix.sh: No such file or directory"

Here are my input files:

trivial.nix

{
  resources.sshKeyPairs.ssh-key = {};

  webserver = { pkgs, ... }: {
    services.openssh.enable = true;

    deployment.targetEnv = "digitalOcean";
    deployment.digitalOcean.enableIpv6 = false;
    deployment.digitalOcean.region = "nyc3";
    deployment.digitalOcean.size = "s-1vcpu-1gb";
  };
}

trivial-digital-ocean.nix

{
  network.description = "Web server";

  webserver =
    { config, pkgs, ... }:
    { services.httpd.enable = true;
      services.httpd.adminAddr = "alice@example.org";
      services.httpd.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
      networking.firewall.allowedTCPPorts = [ 80 ];
    };
}

I created a deployment with: nixops create trivial.nix trivial-digital-ocean.nix -d trivial and then deployed with DIGITAL_OCEAN_AUTH_KEY=<YOURKEY> nixops deploy -d trivial

Output:

webserver> creating droplet ...[in-progress] [in-progress] [in-progress] [in-progress] [in-progress] [in-progress] [in-progress] [in-progress] [in-progress] [completed] 165.227.103.81
webserver> waiting for SSH.......................
webserver> running nixos-infectWarning: Permanently added '165.227.103.81' (ECDSA) to the list of known hosts.

webserver> + makeConf
webserver> + mkdir -p /etc/nixos
webserver> + local 'IFS=
webserver> '
webserver> + keys=($(grep -vE '^[[:space:]]*(#|$)' /root/.ssh/authorized_keys))
webserver> ++ grep -vE '^[[:space:]]*(#|$)' /root/.ssh/authorized_keys
webserver> + cat
webserver> ++ hostname
webserver> ++ for key in '${keys[@]}'
webserver> ++ echo -n '
webserver>     "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAglUkQ7VzRAULTQcItRVdL5D7MrSjNIKGngS6Us6CBk NixOps auto-generated key"'
webserver> + cat
webserver> + local 'IFS=
webserver> '
webserver> + ens3_ip4s=($(ip address show dev eth0 | grep 'inet '          | sed -r 's|.*inet ([0-9.]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'))
webserver> ++ sed -r 's|.*inet ([0-9.]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'
webserver> ++ grep 'inet '
webserver> ++ ip address show dev eth0
webserver> + ens3_ip6s=($(ip address show dev eth0 | grep 'inet6 .*global' | sed -r 's|.*inet6 ([0-9a-f:]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'))
webserver> ++ sed -r 's|.*inet6 ([0-9a-f:]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'
webserver> ++ grep 'inet6 .*global'
webserver> ++ ip address show dev eth0
webserver> + ens4_ip4s=($(ip address show dev eth1 | grep 'inet '          | sed -r 's|.*inet ([0-9.]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'))
webserver> ++ sed -r 's|.*inet ([0-9.]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'
webserver> ++ grep 'inet '
webserver> ++ ip address show dev eth1
webserver> Device "eth1" does not exist.
webserver> + ens4_ip6s=($(ip address show dev eth1 | grep 'inet6 .*global' | sed -r 's|.*inet6 ([0-9a-f:]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'))
webserver> ++ grep 'inet6 .*global'
webserver> ++ sed -r 's|.*inet6 ([0-9a-f:]+)/([0-9]+).*|{ address="\1"; prefixLength=\2; }|'
webserver> ++ ip address show dev eth1
webserver> Device "eth1" does not exist.
webserver> + gateway=($(ip route show dev eth0 | grep default | sed -r 's|default via ([0-9.]+).*|\1|'))
webserver> ++ sed -r 's|default via ([0-9.]+).*|\1|'
webserver> ++ grep default
webserver> ++ ip route show dev eth0
webserver> + gateway6=($(ip -6 route show dev eth0 | grep default | sed -r 's|default via ([0-9a-f:]+).*|\1|'))
webserver> ++ grep default
webserver> ++ sed -r 's|default via ([0-9a-f:]+).*|\1|'
webserver> ++ ip -6 route show dev eth0
webserver> + ether0=($(ip address show dev eth0 | grep link/ether | sed -r 's|.*link/ether ([0-9a-f:]+) .*|\1|'))
webserver> ++ sed -r 's|.*link/ether ([0-9a-f:]+) .*|\1|'
webserver> ++ grep link/ether
webserver> ++ ip address show dev eth0
webserver> + ether1=($(ip address show dev eth1 | grep link/ether | sed -r 's|.*link/ether ([0-9a-f:]+) .*|\1|'))
webserver> ++ grep link/ether
webserver> ++ ip address show dev eth1
webserver> ++ sed -r 's|.*link/ether ([0-9a-f:]+) .*|\1|'
webserver> Device "eth1" does not exist.
webserver> + nameservers=($(grep ^nameserver /etc/resolv.conf | cut -f2 -d' '))
webserver> ++ cut -f2 '-d '
webserver> ++ grep '^nameserver' /etc/resolv.conf
webserver> + cat
webserver> ++ for a in '${nameservers[@]}'
webserver> ++ echo -n '
webserver>       "67.207.67.2"'
webserver> ++ for a in '${nameservers[@]}'
webserver> ++ echo -n '
webserver>       "67.207.67.3"'
webserver> ++ for a in '${ens3_ip4s[@]}'
webserver> ++ echo -n '
webserver>           { address="165.227.103.81"; prefixLength=20; }'
webserver> ++ for a in '${ens3_ip4s[@]}'
webserver> ++ echo -n '
webserver>           { address="10.17.0.5"; prefixLength=16; }'
webserver> ++ type -t customConfig
webserver> + [[ '' == \f\u\n\c\t\i\o\n ]]
webserver> + makeSwap
webserver> ++ mktemp
webserver> + swapFile=/tmp/tmp.gecRvwt0cE
webserver> + dd if=/dev/zero of=/tmp/tmp.gecRvwt0cE bs=1M count=1024
webserver> 1024+0 records in
webserver> 1024+0 records out
webserver> 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 2.33297 s, 460 MB/s
webserver> + chmod 0600 /tmp/tmp.gecRvwt0cE
webserver> + mkswap /tmp/tmp.gecRvwt0cE
webserver> Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
webserver> no label, UUID=7d9d0c6d-9c96-4c53-840d-4dda483e44fc
webserver> + swapon /tmp/tmp.gecRvwt0cE
webserver> + which dnf
webserver> + export USER=root
webserver> + USER=root
webserver> + export HOME=/root
webserver> + HOME=/root
webserver> + groupadd -r nixbld -g 30000
webserver> + seq 1 10
webserver> ++ which nologin
webserver> + xargs '-I{}' useradd -c 'Nix build user {}' -d /var/empty -g nixbld -G nixbld -M -N -r -s /usr/sbin/nologin 'nixbld{}'
webserver> + sh
webserver> + curl https://nixos.org/nix/install
webserver>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
webserver>                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
webserver> + source /root/.nix-profile/etc/profile.d/nix.sh
webserver> bash: line 159: /root/.nix-profile/etc/profile.d/nix.sh: No such file or directory

The reason is that https://nixos.org/nix/install returns the HTTP code 301 Moved Temporarly, so the -L flag should be added to the curl command.

Seems like its fixed in a recent pull request of nixos-infect, so an update of the library is necessary.

closed time in 2 days

koslambrou

startedjhillyerd/flac2mp3

started time in 2 days

push eventNixOS/nixops

Vladimir Serov

commit sha 988bba0b880891f652d3281c29ab85f570f4e91e

Added defaultApp to flake fixes #1441

view details

adisbladis

commit sha 45256745cef246dabe1ae8a7d109988f190cd7ef

Merge pull request #1444 from cab404/master Added defaultApp to flake

view details

push time in 2 days

PR merged NixOS/nixops

Added defaultApp to flake

Fixes #1441

+5 -0

0 comment

1 changed file

cab404

pr closed time in 2 days

issue closedNixOS/nixops

nix run doesn't work with flake on master

$ nix run github:nixos/nixops/master
error: --- SysError ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
unable to execute '/nix/store/ah9k33lhl4y4nqhf4zmfjv0pycaisgys-python3.8-nixops-2.0.0/bin/python3.8-nixops': No such file or directory

Maybe adding a run test would be a good idea? I can try doing that, never touched gh actions before.

closed time in 2 days

cab404

PR opened NixOS/nixops

Added defaultApp to flake

Fixes #1441

+5 -0

0 comment

1 changed file

pr created time in 2 days

PR opened NixOS/nixops

eval-machine-info.nix: Fix nixpkgs setting

Fixes the errors encountered in the test suite:

error: --- EvalError ---------------- nix-instantiate
at: (51:26) in file: /home/user/h/nixops/nix/eval-machine-info.nix

    50|       else throw "NixOps network must have a 'nixpkgs' attribute"
    51|     else (builtins.head (network.network)).nixpkgs or (import <nixpkgs> { inherit system; });
      |                          ^
    52|

attribute 'network' missing

However, I'm a bit puzzled by the fact that the tests succeeded, even without this "fix".

+4 -1

0 comment

1 changed file

pr created time in 2 days

issue closedNixOS/nixops

Digital Ocean backend no longer supported?

When attempting a deployment that had worked on earlier versions of nixops, I got:

nixops.deployment.UnknownBackend: unknown resource type ‘digitalOcean’

Was the digitalOcean backend deprecated? I couldn't find mention of it in the release notes or documentation. Also, I couldn't really find any description of using backends in the new documentation.

closed time in 2 days

livnev

issue commentNixOS/nixops

Digital Ocean backend no longer supported?

@adisbladis Ah thanks, I had no idea.

livnev

comment created time in 2 days

issue commentNixOS/nixops

Digital Ocean backend no longer supported?

The backends have been turned into plugins and live under separate repositories. The digitalocean one has a new home here https://github.com/nix-community/nixops-digitalocean.

livnev

comment created time in 2 days

issue openedNixOS/nixops

Digital Ocean backend no longer supported?

When attempting a deployment that had worked on earlier versions of nixops, I got:

nixops.deployment.UnknownBackend: unknown resource type ‘digitalOcean’

Was the digitalOcean backend deprecated? I couldn't find mention of it in the release notes or documentation. Also, I couldn't really find any description of using backends in the new documentation.

created time in 2 days

issue openedNixOS/nixops

nix run doesn't work with flake on master

$ nix run github:nixos/nixops/master
error: --- SysError ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
unable to execute '/nix/store/ah9k33lhl4y4nqhf4zmfjv0pycaisgys-python3.8-nixops-2.0.0/bin/python3.8-nixops': No such file or directory

Maybe adding a run test would be a good idea? I can try doing that, never touched gh actions before.

created time in 2 days

fork pauln/apexcharts-card

📈 A Lovelace card to display advanced graphs and charts based on ApexChartsJS for Home Assistant

fork in 2 days

startedFlorianUekermann/rustls-acme

started time in 2 days

startedcurv3d/curv

started time in 3 days

fork reptr/plugin-git

Git plugin for Oh My Fish (similar to oh-my-zsh git)

fork in 3 days

startedjhillyerd/hw-cpu

started time in 3 days