Skip to content

Instantly share code, notes, and snippets.

View kozmotronik's full-sized avatar
💭
I may be slow to respond.

Kozmotronik kozmotronik

💭
I may be slow to respond.
View GitHub Profile
@Juke34
Juke34 / bash_tuning.md
Last active March 20, 2024 16:10
Bash personalization
@tcpdump-examples
tcpdump-examples / iowait-linux.md
Created March 21, 2021 11:40
How to Fix io wait issue in Linux

Linux high IOwait is a common Linux performance issue. Today we will look at what iowait means and what contributes to this problem. Hope this can give you more ideas about high IOwait issue.

What is IOwait?

IO wait is related to the CPU resource on the server.

The iowait column on top command output shows the percentage of time that the processor was waiting for I/O to complete. It indicates that the system is waiting on disk or network IO. Because the system is waiting on those resources, it can not fully utilize the CPU.

Learn more about what IOwait here.

@vikpe
vikpe / fix_authenticity_of_github_problem.md
Last active July 12, 2024 07:39
FIX: The authenticity of host github.com can't be established.

Error

The authenticity of host 'github.com (140.82.113.4)' can't be established.

Fix

ssh-keyscan github.com >> ~/.ssh/known_hosts
@cetinajero
cetinajero / ddrescue.md
Last active July 1, 2024 15:45
Guide for using Ddrescue to recover data

Guide for using Ddrescue to recover data

Start command:

ddrescue -d /dev/sda output.img output.mapfile

NOTE: If direct disc access is not available in your system, try raw devices.

@danielgalasko
danielgalasko / RepeatingTimer.swift
Last active March 28, 2024 10:26
A repeating GCD timer that can run on a background queue
/// RepeatingTimer mimics the API of DispatchSourceTimer but in a way that prevents
/// crashes that occur from calling resume multiple times on a timer that is
/// already resumed (noted by https://github.com/SiftScience/sift-ios/issues/52
class RepeatingTimer {
let timeInterval: TimeInterval
init(timeInterval: TimeInterval) {
self.timeInterval = timeInterval
}
@marcouberti
marcouberti / mock_android_context.java
Last active May 2, 2024 11:43
Mock Android Context using Mockito
import org.mockito.Mock;
import static org.mockito.Mockito.when;
@Mock
private Context mockApplicationContext;
@Mock
private Resources mockContextResources;
@Mock
private SharedPreferences mockSharedPreferences;
@austinglaser
austinglaser / gcov_project.yml
Created July 17, 2016 21:41
Basic configuration for Ceedling using the gcov plugin
---
# Notes:
# Sample project C code is not presently written to produce a release artifact.
# As such, release build options are disabled.
# This sample, therefore, only demonstrates running a collection of unit tests.
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE