Skip to content

Instantly share code, notes, and snippets.

View daluu's full-sized avatar

David Luu daluu

View GitHub Profile
@styblope
styblope / docker-api-port.md
Last active June 13, 2025 09:41
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o main .
@mcupak
mcupak / javaone.jsh
Created October 4, 2017 21:56
JShell history export from Exploring Java 9 with REPL talk at JavaOne 2017.
ls
1+1
int x = 1+1
System.out.println(x)
/vars
/types
/list
/l
/help
HashSet<String> set = new HashSet<String>()
@minrk
minrk / httpd.conf
Last active February 4, 2021 23:35
notebook docker proxy
# apache httpd.conf
# equivalent to nginx.conf, but allows us to test with apache as well
# in case it behaves differently (hint: it does)
# docker run -d --name nbproxy-apache -p 8088:80 -v "$PWD"/httpd.conf:/usr/local/apache2/conf/httpd.conf httpd:2.4
Include conf/original/httpd.conf
ServerName 127.0.0.1
LoadModule proxy_module modules/mod_proxy.so
@pr0da
pr0da / README.md
Last active December 5, 2020 07:57
MacOS X on Windows/Linux
@jclosure
jclosure / install_dia_osx.md
Created August 6, 2017 00:20
How to install Dia on OSX (and have it run)
brew cask install dia

After his it won't run because DISPLAY=:0 env var is not set

vim /Applications/Dia.app/Contents/Resources/bin/dia
@abstractart
abstractart / books.md
Last active May 26, 2025 16:54
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 18, 2025 02:05 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@keeth
keeth / 01-next-js.config
Last active October 27, 2021 18:37
Next.js on Elastic Beanstalk, run 'next build' or 'npm run build' from .eb-extensions
container_commands:
01_build:
command: "PATH=$NODE_HOME/bin:$PATH $NODE_HOME/bin/npm run build"