Code Snippet

Just another Code Snippet site

Random Post :




[CMD] Windows shell : mount a shared drive

mount a shared drive

net use z: \servername\sharedfolder /user:username password /persistent:yes

if no user/password :

net use z: \servername\sharedfolder /persistent:yes

[Java] Extract ZIP file

        ZipFile zipFile = new ZipFile(outputFile);

        Enumeration<? extends ZipEntry> entries = zipFile.entries();

        while (entries.hasMoreElements()) {
            ZipEntry entry = entries.nextElement();
            InputStream stream = zipFile.getInputStream(entry);
            IOUtils.copy(stream, new FileOutputStream(new File(OUTPUT_FOLDER, entry.getName())));
        }

Alpine Linux

Install cURL :

RUN apk --no-cache add curl

Notice: This command it’s only available from Alpine version 3.3

How to install telnet into a alpine docker container :

apk add busybox-extras
busybox-extras telnet localhost 6900

Previous Posts Next posts