Life hack for github-cli gh repo clone $(printf 'squidowl/halloy%.0s ' {1..2})
, i.e. clone into owner/repo directory, not just repo. #github
EDIT:
I wrote a small #bash (obviously works also for #zsh) function to make cloning easier in my environment:
gh-repo-work() {
local url=$1
# Strip path from URL:
local url_path=${url#*\.*/}
# Clone to the Github tree:
gh repo clone $url_path "$HOME/work/github/$url_path"
}
“Demo”:
~ main*
❯ gh-repo-work m4b/goblin
Cloning into '/Users/jarkko/work/github/m4b/goblin'...
remote: Enumerating objects: 7261, done.
remote: Counting objects: 100% (1215/1215), done.
remote: Compressing objects: 100% (326/326), done.
remote: Total 7261 (delta 977), reused 922 (delta 889), pack-reused 6046
Receiving objects: 100% (7261/7261), 3.22 MiB | 4.69 MiB/s, done.
Resolving deltas: 100% (5565/5565), done.
~ main*
❯ ls -1 work/github/m4b/goblin
CHANGELOG.md
Cargo.toml
LICENSE
Makefile
README.md
assets
etc
examples
fuzz
fuzz-afl
src
tests
~ main*
❯ rm -rf work/github/m4b/goblin
~ main*
❯ gh-repo-work https://github.com/m4b/goblin
Cloning into '/Users/jarkko/work/github/m4b/goblin'...
remote: Enumerating objects: 7261, done.
remote: Counting objects: 100% (1227/1227), done.
remote: Compressing objects: 100% (337/337), done.
remote: Total 7261 (delta 988), reused 923 (delta 890), pack-reused 6034
Receiving objects: 100% (7261/7261), 3.23 MiB | 6.68 MiB/s, done.
Resolving deltas: 100% (5564/5564), done.
~ main*
❯ ls -1 work/github/m4b/goblin
CHANGELOG.md
Cargo.toml
LICENSE
Makefile
README.md
assets
etc
examples
fuzz
fuzz-afl
src
tests
The list of papers accepted at the 2nd #eBPF workshop has been published by ACM: https://dl.acm.org/doi/proceedings/10.1145/3672197#tableOfContent.
Trump to the press: I will crush you like the bugs you are.
Journalists: Haha there goes Trump again.
Biden: I'm incredibly disappointed in your coverage:
Journalists: How dare you? Resign immediately, you ungrateful pathetic SOB.
Flow planned for my cheapo #BPF flame graph for a single driver:
The host side then consumes the fixed-size packets and puts matching stacks to the same bucket. A second thread can periodically then compose flame graph of the data corrected so far.
Somehow got into learning this eBPF stuff during the holidays :-) Super interesting and addicting.
GitHub's co-founder and former CEO launched the Ladybird initiative, a brand-new independent browser written from scratch and backed by a non-profit.
https://linuxiac.com/ladybird-is-a-new-browser-initiative-backed-up-by-1m/
I think, just based on experience on previous tech revolutions, that #AI is neither useless nor it is going to repeal and replace human labor.
It just hasn’t hit the its roof, or more precisely constraints, yet.
Media only giving voice to either AI companies or AI researchers turned into doomsday predictors, is at least quite strong signal of a bubble.
If you feel that AI is evil, here’s couple of suggestions what you can do:
Here’s a minimal shenanigans for #eBPF #C host, with bpftool
taking care of header generation.
Payload (payload.c
):
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
SEC("tracepoint/syscalls/sys_enter_execve")
int tracepoint__syscalls__sys_enter_execve(struct trace_event_raw_sys_enter *ctx)
{
bpf_printk("execve");
return 0;
}
char LICENSE[] SEC("license") = "GPL";
Host (main.c
):
#include <bpf/bpf.h>
#include <bpf/libbpf.h>
#include <signal.h>
#include "payload.h"
static volatile bool interrupted = false;
struct payload *obj;
void do_sigint(int value)
{
interrupted = true;
}
int main(void)
{
struct sigaction sa;
ssize_t ret;
obj = payload__open();
if (!obj)
exit(1);
ret = payload__load(obj);
if (ret)
goto err;
ret = payload__attach(obj);
if (ret)
goto err;
sa.sa_handler = do_sigint;
sigaction(SIGINT, &sa, NULL);
while (!interrupted);
fprintf(stderr, "\ndone\n");
payload__destroy(obj);
exit(0);
err:
payload__destroy(obj);
exit(1);
}
Build (build.sh
):
#!/usr/bin/env sh
# vmlinux
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
# payload
clang -g -O2 -target bpf -I . -c payload.c -o payload.o
bpftool gen skeleton payload.o > payload.h
# main
clang -g -O2 -Wall -I . -c main.c -o main.o
# hello-ebpf
clang -Wall -O2 -g main.o -lbpf -lelf -lz -o hello-ebpf
While running trace_pipe
is expected to have output like this:
cat-61135 [011] ....1 8303.116335: bpf_trace_printk: execve
zsh-61136 [002] ....1 8303.116691: bpf_trace_printk: execve
zsh-61139 [004] ....1 8303.118436: bpf_trace_printk: execve
I’ve been wondering over the years when being at #Airport check-ins how come these #PowerShell scripts can possibly ever work.
I know this because I’ve seen numerous times over the years crashed check-in machines. Latest one was late Spring when I visited #Ethprague at #Prague Airport.
I miss the “OS/2” and “Guru Meditation” times of my late 90s and early 00’s in vending machines etc. ;-)
Your local airport is actually airport.bat
!
Wrote a pretty good Windows emulator in {fmt}:
#include <fmt/color.h>
int main() {
fmt::print(bg(fmt::color::blue),
"{:1600}", "Your PC ran into a problem and needs to restart.");
}
Things that Mastodon spam accounts following me have put in their profiles today:
• "Passionate crypto trader, let's vibe"
• "Full Stack Digital Marketer Consultant"
What a world.