Skip to content

Instantly share code, notes, and snippets.

View omo's full-sized avatar

Hajime Morrita omo

  • Mountain View, CA
View GitHub Profile
@omo
omo / README.md
Last active March 14, 2024 15:56
XPS 17 9730 touchpad problem workaround on Ubuntu 22.04

XPS 17 9730 touchpad problem workaround on Ubuntu 22.04

This is a follow up for my Reddit post. Note that this is relevant for the classic X server (not Xwayland, which doesn't have this problem). If you have an NVIDIA GPU on your laptop, This is probably for you: Ubuntu configures the system with the non-Wayland, classic X server when an NVIDIA GPU is used.

The inspiration is from this article from the DELL site. Although the approach is outdated for recent Ubuntu, the basic premise is the same, that is, to eliminate duplicated touchpad / mouse input from X server configuration.

@omo
omo / Dockerfile
Created February 1, 2021 05:26
oauth2-proxy on Cloud Run
FROM alpine:3.13
WORKDIR /opt/draft-proxy
RUN apk update && apk add git curl
RUN curl -L -o package.tgz https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v6.1.1/oauth2-proxy-v6.1.1.linux-amd64.tar.gz && \
tar xvzf package.tgz && \
mv oauth2-proxy-*.linux-amd64/oauth2-proxy .
CMD ["./oauth2-proxy", \
"--provider=github", "--github-org=YOUR_GITHUB_ORG", "--email-domain=*", \
"--http-address=0.0.0.0:8080", \
"--reverse-proxy=true", \
@omo
omo / README.md
Created August 1, 2020 03:50
V2S Privacy Policy

We don't any PII but who cares anyway?

const int large_size = 32*1024*1024;
const volatile int large[large_size] = {};
int main() {
for (int i = 0; i < large_size; i++) {
volatile int li = large[i];
}
return 0;
}
@omo
omo / vp.html
Last active September 30, 2015 01:24
More viewport experiment
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='initial-scale=1, width=device-width, height=device-height' />
<script>
window.addEventListener('load', function() {
var c = document.getElementById('console');
c.innerHTML = ("w=" + window.innerWidth + " h=" + window.innerHeight);
});
</script>
@omo
omo / correct.html
Last active September 29, 2015 01:36
Viewport experiments
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=5.0,width=200">
</head>
<body>
<div style='width: 100px; height: 100px; background-color:red;'>100x100</div>
<h1>Hello! I'm correct!</h1>
<div>The initial-scale should work. You sould see zoomed text (x5.0).</div>
</body>
@omo
omo / mojo-small.svg
Created April 15, 2015 00:31
IPC::Channel perf comparison
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@omo
omo / mp-12b.svg
Created March 24, 2015 18:43
Message Pipe benchmark Flame graphs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@omo
omo / link.txt
Last active August 29, 2015 14:17
Title Dialog