Skip to content

Instantly share code, notes, and snippets.

View extrowerk's full-sized avatar

extrowerk extrowerk

View GitHub Profile
From 2baa0abbbb8a97b0c1eb70b1aeafcf7fdba25ad4 Mon Sep 17 00:00:00 2001
From: X512 <danger_mail@list.ru>
Date: Wed, 12 May 2021 18:03:24 +0900
Subject: WIP: Haiku patches, share UART with RISC-V machine
---
Makefile | 9 +-
cutils.h | 2 +-
fs_disk.c | 15 +++
riscv_cpu.c | 7 +-
@zumikkebe
zumikkebe / winpwnr.sh
Last active December 31, 2023 23:40
winpwnr.sh is a one-liner Haikus' hey front-end with the intent to domate windows
#! /bin/bash
Usage()
{
echo "usage: ${script_name} [-D] [-a value] [-dhl] [-s value] [-f] [-twLFGpPMAmHnr value]
-D automatically detects the current active window, obtaining the name of the application and the ID number
-a select the application by name
@ahwayakchih
ahwayakchih / pause_active_app.cpp
Created September 22, 2018 07:15
Proof-of-concept of quick pause/resume active application on Haiku
/*
* Copyright 2018, Marcin Konicki
* All rights reserved. Distributed under the terms of the MIT license.
*/
// This was written after reading:
// https://vermaden.wordpress.com/2018/09/19/freebsd-desktop-part-16-configuration-pause-any-application/
// and then:
// https://dev.haiku-os.org/ticket/14507
@PanagiotisPtr
PanagiotisPtr / Parser.h
Created June 24, 2018 16:28
Json Parser in C++ with Libcurl and Jsoncpp
#ifndef PARSER_H
#define PARSER_H
#include <iostream>
#include <string>
#include <curl/curl.h>
#include <jsoncpp/json/json.h>
#include <jsoncpp/json/reader.h>
#include <jsoncpp/json/writer.h>
@ErikAugust
ErikAugust / spectre.c
Last active July 5, 2024 18:14
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@juhovh
juhovh / trans-siberia.txt
Last active December 16, 2017 16:54
Some rough plan for Trans-Siberian train
Some basic info:
- Russian trains always run in Moscow time, that's why Moscow time is mentioned
- The track gauge is different in Mongolia and China, so there's always a stop on Chinese border
- We should try to have a get together in Beijing between July 1st and July 16th (Victorian school holidays),
it's a good time as well since end of June should be comfortable weather to travel in Siberia and there's
already more trains than usual.
- There is no time difference between most of Mongolia and Beijing, Irkutsk is one hour ahead of China which
is a bit awkward
Moscow - Irkutsk
@connormanning
connormanning / curl_jsoncpp_example.cpp
Last active August 11, 2022 04:35
Curl HTTP GET and JsonCpp parsing - basic functionality
#include <cstdint>
#include <iostream>
#include <memory>
#include <string>
#include <curl/curl.h>
#include <json/json.h>
namespace
{