Skip to content

Instantly share code, notes, and snippets.

Avatar

Kenichi Nakamura kenichi

  • Portland, Oregon
View GitHub Profile
@kenichi
kenichi / Dockerfile
Last active Nov 7, 2022
gcloud docker with cli alias for m1
View Dockerfile
FROM google/cloud-sdk:latest
ARG UID
ARG GID
ARG USERNAME
RUN useradd -u $UID -g $GID $USERNAME
WORKDIR /home/$USERNAME
USER $USERNAME
@kenichi
kenichi / .iex.exs
Created Aug 29, 2022
IEX clipboard helper
View .iex.exs
defmodule KEx do
@moduledoc "custom IEx extensions"
@doc """
Send data to `pbcopy`, a macOS utility that reads STDIN into the clipboard.
"""
def pbcopy(data) do
port = Port.open({:spawn, "/usr/bin/pbcopy"}, [:binary])
send(port, {self(), {:command, data}})
send(port, {self(), :close})
@kenichi
kenichi / Dockerfile
Created Jul 13, 2022
dockerfile and compose for local dev with elixir:alpine
View Dockerfile
FROM elixir:1.13-alpine AS base
RUN apk add --no-cache \
bash \
inotify-tools \
nodejs npm \
openssl
WORKDIR /app
CMD ["mix", "phx.server"]
View bionode_assembly_dl.txt
$ bionode-ncbi search assembly phylos | jq .uid
"874841"
$ bionode-ncbi download assembly 874841
$ cd 874841/
$ gunzip GCA_001865755.1_ASM186575v1_genomic.fna.gz
$ head GCA_001865755.1_ASM186575v1_genomic.fna
View prefetch_sra.txt
$ prefetch SRS4167515
prefetch.2.9.3: 1) Downloading 'SRS4167515'...
prefetch.2.9.3: Downloading via https...
prefetch.2.9.3: 1) 'SRS4167515' was downloaded successfully
prefetch.2.9.3: 'SRS4167515' has 0 unresolved dependencies
View head_fastq.txt
$ head SRS4167515_?.fastq
==> SRS4167515_1.fastq <==
@SRS4167515.1 1 length=76
AGTCTTGTCTCCCAGCAACAATCCGAAACCACCATCTCAATGGAAGAGGCTTCTTTCCCAGAACCTCCTCCACTTG
+SRS4167515.1 1 length=76
AAAAAAE///EAE/E</EAEA/A/EAEEEE/EAEE<EEE<E//EEEA//EEAEEA///E//EAEE/E/EAAEEEE/
@SRS4167515.2 2 length=76
GTCTTGTCTCCCAAGCAACAAGCCGAAACCACCATCTCAATGGAAGAGGCTTCTTTCCCAGACCCTCCTCCACTTG
+SRS4167515.2 2 length=76
AAAAAEEEEEEEEEEEEEEE6EEEEEEEEE/EE/EEEEE6EEEEEEEEEEEAEEAEEEAEE66EEEAEEA<AAAEE
View fastq-dump.txt
$ fastq-dump --split-files SRS4167515.sra
Read 2840859 spots for SRS4167515.sra
Written 2840859 spots for SRS4167515.sra
View ncbi_tree.txt
ncbi/
└── public
└── sra
└── SRS4167515.sra
View Dockerfile
FROM base_prod_example_php_fpm:latest
COPY --chown=www-data example /var/www/example/
View Dockerfile
FROM local_example_php_fpm:latest
COPY --chown=www-data \
example/composer.json \
example/composer.lock \
example/composer.phar \
/var/www/example/
COPY --chown=www-data example/vendor /var/www/example/vendor