Skip to content

Instantly share code, notes, and snippets.

View mach-kernel's full-sized avatar
😸
mrrrrow!

David Stancu mach-kernel

😸
mrrrrow!
View GitHub Profile
[fedora]
name=Fedora 31 - x86_64
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-31&arch=x86_64
enabled=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-31-x86_64
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#Path 0
color(7);
bgnpolygon();
vertex(8.051858,44.963826);
vertex(8.140266,46.948369);
vertex(9.011796,49.985860);
vertex(10.550670,53.866927);
vertex(12.641110,58.382199);
vertex(15.167339,63.322303);
vertex(18.013579,68.477867);
@mach-kernel
mach-kernel / launch_key_getjob.c
Last active August 24, 2022 10:39
launch.h API for getting launchd job by label
/**
./launch_key_getjob_test com.apple.Spotlight
LimitLoadToSessionType: Aqua
MachServices: (cba) 0x7fbfbb504700
Label: com.apple.Spotlight
OnDemand: (cba) 0x7fff9464d490
LastExitStatus: 0
PID: 562
Program: /System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight
use std::os::raw::{c_void, c_int, c_char};
use std::ptr::{null_mut, null};
use std::ffi::{CStr, CString};
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
extern "C" {
pub fn xpc_pipe_create_from_port(port: mach_port_t, flags: u64) -> xpc_pipe_t;
pub fn xpc_pipe_routine_with_flags(
pipe: xpc_pipe_t,