Skip to content

Instantly share code, notes, and snippets.

View anthonydahanne's full-sized avatar

Anthony Dahanne anthonydahanne

View GitHub Profile
@henrik-muehe
henrik-muehe / Dockerfile
Created August 5, 2013 11:47
Allows installing the ubuntu "fuse" package without creating any devices. Used to install packages on docker which require fuse but do not actively use it.
...
# Fake a fuse install
RUN apt-get install libfuse2
RUN cd /tmp ; apt-get download fuse
RUN cd /tmp ; dpkg-deb -x fuse_* .
RUN cd /tmp ; dpkg-deb -e fuse_*
RUN cd /tmp ; rm fuse_*.deb
RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst
RUN cd /tmp ; dpkg-deb -b . /fuse.deb
@takuzoo3868
takuzoo3868 / tree.sh
Last active June 13, 2024 20:27
Shell script that reproduced the tree command
#!/usr/bin/env bash
# treeを擬似的に再現したスクリプト
dir_count=0
file_count=0
traverse() {
dir_count=$(expr $dir_count + 1)
local directory=$1
local prefix=$2
@styblope
styblope / docker-api-port.md
Last active June 7, 2024 15:21
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"]}
    
@BlackthornYugen
BlackthornYugen / ApacheMailer.kt
Last active June 3, 2024 00:15
Sending an email using kotlin and javax.mail
/*
* Sending an email using kotlin and Apache Commons Email
*
* Usage: java -jar app.jar <user> <password> <from> <to> <cc>
*/
package main.kotlin.sendmail
import org.apache.commons.mail.Email
import org.apache.commons.mail.EmailException
import org.apache.commons.mail.HtmlEmail