Skip to content

Instantly share code, notes, and snippets.

@jr-md
jr-md / device.xml
Created December 1, 2020 09:43
Samsung Galaxy S8 AVD Hardware Profile
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<d:devices xmlns:d="http://schemas.android.com/sdk/devices/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<d:device>
<d:name>Samsung Galaxy S8</d:name>
<d:manufacturer>User</d:manufacturer>
<d:meta/>
<d:hardware>
<d:screen>
<d:screen-size>large</d:screen-size>
<d:diagonal-length>5.80</d:diagonal-length>
@jr-md
jr-md / .bash_aliases
Created April 6, 2020 16:09
useful bash aliases
alias git-push-to-origin='git push origin $(git rev-parse --abbrev-ref HEAD)'
alias git-pull-from-origin='git pull origin $(git rev-parse --abbrev-ref HEAD)'
@jr-md
jr-md / readme.md
Created March 10, 2020 16:38
calling application running on local machine from a docker container
  • start app on local machine running on port 8081

Windows/Mac OS

  • in a separate terminal window, start container: docker run -it alpine:latest sh Linux:
  • in a separate terminal window, start container: docker run -it --network="host" alpine:latest sh

Windows/Mac OS

  • in the docker container, fetch the page, using host.docker.internal as the domain name: wget http://host.docker.internal:8081/ Linux (host):
@jr-md
jr-md / reflection_test.go
Created February 24, 2020 13:46
go struct reflection
type A struct {
Foo string
X int
B
c C
}
type B struct {
Y time.Time
@jr-md
jr-md / Makefile
Last active September 2, 2019 09:44
protocol buffers
.PHONY: gen_protos
gen_protos:
protoc -I=./ --go_out=./generatedprotos/ ./person.proto
@jr-md
jr-md / index.html
Last active September 27, 2021 17:44
Chrome extension: list tabs
<html>
<head>
<style>
body {
width: 400px;
min-height: 100px;
}
</style>
</head>
<body>