Skip to content

Instantly share code, notes, and snippets.

View mjavadhpour's full-sized avatar
:octocat:

M.J. mjavadhpour

:octocat:
  • The Earth
View GitHub Profile
@MichaelSimons
MichaelSimons / RetrievingDockerImageSizes.md
Last active November 8, 2024 10:32
Retrieving Docker Image Sizes

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size

@xeptore
xeptore / CMakeLists.txt
Last active July 5, 2019 11:45
cpp vscode development (cmake, build, and debugging) configurations
cmake_minimum_required (VERSION 3.10)
project (main)
# book.cpp implementing book.h definitions
add_library(Book book.h book.cpp)
add_executable(main main.cpp)
# linking Book library to main
target_link_libraries (main Book)
@surma
surma / README.md
Last active March 8, 2024 12:06
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@thisismzm
thisismzm / exphp
Last active May 3, 2018 23:51
This is a bash script for switch between PHP versions that are enable as Apache2 webserver module.
#!/bin/bash
sudo update-alternatives --set php "/usr/bin/php$2";
sudo update-alternatives --set "php-config" "/usr/bin/php-config$2";
sudo update-alternatives --set phpize "/usr/bin/phpize$2";
sudo a2dismod "php$1"
sudo a2enmod "php$2"
sudo service apache2 restart
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<meta-data
android:name="com.samsung.android.vr.application.mode"
android:value="vr_only"/>
</application>
</manifest>
@rohankhudedev
rohankhudedev / opcache.ini
Last active November 10, 2024 15:24
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
@stellingsimon
stellingsimon / AuditingConnection.java
Last active September 9, 2023 08:50
Recording row-level auditing information from an application's user session context in a Postgres DB (9.5+)
package example.postgres.audit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Savepoint;
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active October 20, 2024 16:20
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in