Skip to content

Instantly share code, notes, and snippets.

View jacekmigacz's full-sized avatar
🏠
Working from home

Jacek Migacz jacekmigacz

🏠
Working from home
  • Poland
  • 17:17 (UTC +02:00)
View GitHub Profile
DIR *.c *.h *.model /B /S | FINDSTR /V /I "\.model$" | FINDSTR /V "\bin"
import time
def busy_sleep(secs):
sts, lts = time.perf_counter(), time.perf_counter()
mf = 0
while True:
nts = time.perf_counter()
dt = nts - sts
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#define W_WIDTH 100
#define W_HEIGHT 100
#define X_POS 100
#define Y_POS 120
#define BORDER_WIDTH 2
#!/bin/bash
sample_output() {
echo 1 2
echo 3 4
echo 5 6
}
find_max() {
local x=0
@jacekmigacz
jacekmigacz / meson build
Last active June 1, 2021 13:23
systemd:rhel-8
[jsm@fedora rhel-8]$ meson build/
The Meson build system
Version: 0.56.2
Source dir: /tmp/rhel-8
Build dir: /tmp/rhel-8/build
Build type: native build
Project name: systemd
Project version: 239
C compiler for the host machine: cc (gcc 11.1.1 "cc (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1)")
C linker for the host machine: cc ld.bfd 2.35.1-41
[jsm@manthor sysstat]$ koji-download-scratch 71069191
Warning: download-scratch is deprecated, use koji(1) instead.
Getting rpms from children of task 71069191: build (rawhide, sysstat-12.5.4-1.fc35.src.rpm)
Downloading rpms from task 71069236: buildArch (sysstat-12.5.4-1.fc35.src.rpm, x86_64)
mock_output.log | 7.7 kB 00:00:00
hw_info.log | 2.9 kB 00:00:00
state.log | 1.0 kB 00:00:00
build.log | 62 kB 00:00:00
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/urlgrabber/grabber.py", line 1943, in _progress_update
@jacekmigacz
jacekmigacz / sed cheatsheet
Last active November 2, 2022 19:20 — forked from ssstonebraker/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'