Skip to content

Instantly share code, notes, and snippets.

@hakerdefo
hakerdefo / sources.list
Created June 11, 2023 18:47
Debian 12 "bookworm" complete sources.list
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
@zhangyoufu
zhangyoufu / 99-replica-set.sh
Created June 10, 2019 11:07
ugly hack to initialize replica set for MongoDB docker container, put under /docker-entrypoint-initdb.d/
#!/bin/bash
: "${FORKED:=}"
if [ -z "${FORKED}" ]; then
echo >&2 'mongod for initdb is going to shutdown'
mongod --pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --shutdown
echo >&2 'replica set will be initialized later'
FORKED=1 "${BASH_SOURCE[0]}" &
unset FORKED
mongodHackedArgs=(:) # bypass mongod --shutdown in docker-entrypoint.sh
@ttycelery
ttycelery / jingle-family-mart.txt
Last active May 8, 2024 09:05
Lirik Jingle Family Mart Lengkap 100%
// Transcribed manually from
// https://www.youtube.com/watch?v=GpUhmUVvD9Y
// Enjoy ;)
Hai kawan-kawan
Mari bekerja membangun bersama FamilyMart
Suka dan duka ada di FamilyMart
Semua keluarga kita
Mari menyapa pelanggan kita
@raulmoyareyes
raulmoyareyes / networkCommand.md
Last active May 8, 2024 09:03
Linux command to check Internet connection speed.

# View public IP

  • curl -s checkip.dyndns.org | sed 's#.Address: (.)</b.*#\1#'
  • wget -qO - icanhazip.com
  • curl ifconfig.me
  • curl ident.me
  • dig +short myip.opendns.com @resolver1.opendns.com
  • lynx -dump ifconfig.me | grep 'IP Address'
  • curl ipecho.net/plain
  • curl bot.whatismyipaddress.com
  • curl ipinfo.io
@codequokka
codequokka / start-tmux-automatically-on-zsh.zsh
Last active May 8, 2024 09:00
Start tmux automatically on zsh
# Start the tmux session if not alraedy in the tmux session
if [[ ! -n $TMUX ]]; then
# Get the session IDs
session_ids="$(tmux list-sessions)"
# Create new session if no sessions exist
if [[ -z "$session_ids" ]]; then
tmux new-session
fi
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
@msauza
msauza / spring-boot-docker.md
Last active May 8, 2024 08:59
Multi-Layer, Multi-Stage: Spring Boot application with Docker.

Overview

Spring Boot applications can run within a container by Multi-Layer based approach. Each layer may contain different parts of the application such as dependencies, source code, resources and even snapshot dependencies.

In the other hand, with Multi-Stage Build approach, any application can be built at a separate image from the final image that will contain the runnable application.

Spring Boot Docker

Multi-Layer

The citations game: Wolverton Ratios

Rubric: Software Engineering : Factual Claims : Defect Cost Increase : Wolverton Ratios

Context

See previous note on the IBM Systems Sciences Institute

In absolute numbers, the Wolverton are as follows: 139:455:977:7136:14102, claimed dollar costs of fixing an "average" defect. (Itself an absurd claim, see Leprechauns, I should perhaps write more on that.)

@Morendil
Morendil / ibm-systems-science-institute.md
Last active May 8, 2024 08:58
The IBM Systems Science Institute

The IBM Systems Science Institute

Rubric: Software Engineering : Factual Claims : Defect Cost Increase : Pressman Ratios

Context

Background: I have been researching quantity and quality of empirical evidence underlying claims in software engineering. What do we know, and how well-established is that? See in particular https://leanpub.com/leprechauns which concludes that the answer is in (too) many cases "not much, and poor".

This applies in particular to the "Defect Cost Increase" claim, which is poorly supported by evidence. The claim states that the longer a defect stays undiscovered after being introduced in a software system's artefacts, the more expensive it is to correct.

@tassaron
tassaron / plasma-backlight.sh
Last active May 8, 2024 08:58
set KDE Plasma backlight brightness using dbus with a bash script
#!/bin/bash
# Set this to 1 to reset the backlight to 100% after execution
TEST_MODE=0
DBUS_SERVICE="local.org_kde_powerdevil"
DBUS_PATH="/org/kde/Solid/PowerManagement/Actions/BrightnessControl"
MAX_BRIGHTNESS=$(qdbus $DBUS_SERVICE $DBUS_PATH brightnessMax)