$ sudo docker-containerd-ctr pprof --debug-socket /run/docker/containerd/docker-containerd-debug.sock goroutines
goroutine 1916106 [running]:
runtime/pprof.writeGoroutineStacks(0x55e3880d1be0, 0xc420200540, 0x0, 0x0)
/usr/local/go/src/runtime/pprof/pprof.go:608 +0xa9
runtime/pprof.writeGoroutine(0x55e3880d1be0, 0xc420200540, 0x2, 0x30, 0x55e387c98c00)
/usr/local/go/src/runtime/pprof/pprof.go:597 +0x46
runtime/pprof.(*Profile).WriteTo(0x55e3880bd6c0, 0x55e3880d1be0, 0xc420200540, 0x2, 0xc420200540, 0xc42035e9c0)
/usr/local/go/src/runtime/pprof/pprof.go:310 +0x3ad
net/http/pprof.handler.ServeHTTP(0xc42011c6d1, 0x9, 0x55e3880dc720, 0xc420200540, 0xc42019ff00)
View ESO-EELT-CentOS-74.repo
[ESO-EELT-CentOS-74] | |
name=ESO repository for EELT Linux DevEnv | |
baseurl=ftp://ftp.eso.org/pub/eelt/EELTREPO/CentOS-74 | |
enabled=1 | |
gpgcheck=0 | |
metadata_expire=1m |
View gist:143c3e6b7c9e5fc8f18c9204ca1bedf6
View update-docker-compose.sh
#!/bin/bash | |
# Copyright 2017-2018 Jean-Christophe Berthon | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
View Readme.md
Source: https://access.redhat.com/articles/199563
This program will insert an actual leap second and may cause issues on unpatched systems. It is strongly recommended to use this in a test environment.
Build
gcc leap-a-day.c -o leap-a-day -lrt
Usage
View networkmanager-wifi-powersave.md
NetworkManager WiFi Power Saving
NetworkManager supports WiFi powersaving but the function is rather undocumented.
From the source code: wifi.powersave can have the following value:
- NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
- NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
- NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
View ssh-fingerprint
# The examples below are given with the hostname github.com. | |
# Just change the hostname to one of your known hosts. | |
# These commands are particularly usefull if your ~/.ssh/known_hosts file is | |
# hashed! | |
# To display the fingerprint in its default form | |
ssh-keygen -l -F github.com | |
# To choose the algorithm for displaying the fingerprint (valid option for OpenSSH 7.2 are: `md5` or `sha256`) | |
ssh-keygen -l -E sha256 -F github.com |
View docker-img-gc
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi |
View mount.sh
#!/usr/bin/env bash | |
# call with `mount.sh true` for debug messages | |
home_vols=( "/Volumes/NFS_mount" ) # if more than one mountpoint then order is important | |
home_router_mac="0:23:46:9d:e:f7" # use code below to identify this data | |
mounts=( `mount | grep /Volumes | awk {'print$3'}` ) | |
router_ip=`netstat -rnf inet | grep default | awk {'print$2'}` | |
router_mac=`netstat -rnf inet | grep -v link | grep -w ^$router_ip | awk {'print$2'}` | |
#echo $router_mac #for current router's MAC address |
View init_end_boot_script
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: nothing | |
# Required-Start: $all | |
# Default-Start: 3 5 | |
# Default-Stop: 4 | |
# Short-Description: single_line_description | |
# Description: multiline_description | |
### END INIT INFO |
View report_duplicate.rb
# Source: http://www.dzone.com/snippets/identify-duplicates-array | |
module Enumerable | |
# Returns any duplicates entry if found | |
# Usage: <enumerable>.report_duplicate | |
def report_duplicate | |
inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys | |
end | |
end |
NewerOlder