This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const w32 = @import("vendor/zigwin32/win32.zig").everything; | |
const TRUE: w32.BOOL = 1; | |
const FALSE: w32.BOOL = 0; | |
fn windowProc(handle: w32.HWND, msg: u32, wparam: w32.WPARAM, lparam: w32.LPARAM) callconv(.C) w32.LRESULT { | |
switch (msg) { | |
w32.WM_DESTROY => { | |
w32.PostQuitMessage(0); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from '@pulumi/pulumi'; | |
import { Octokit } from '@octokit/core'; | |
import { AppAuthentication, createAppAuth } from '@octokit/auth-app'; | |
export interface ConfigurationResourceInputs { | |
appId: pulumi.Input<string>; | |
privateKey: pulumi.Input<string>; | |
clientId: pulumi.Input<string>; | |
clientSecret: pulumi.Input<string>; | |
url: pulumi.Input<string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use windows::Win32::System::Registry::{RegGetValueW, HKEY_CURRENT_USER, RRF_RT_REG_DWORD}; | |
use crate::{ | |
assert::{assert_eq, Result}, | |
wide_string::ToWide, | |
}; | |
pub enum Theme { | |
Light, | |
Dark, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use windows::Win32::Foundation::PWSTR; | |
#[derive(Default)] | |
pub struct WideString(pub Vec<u16>); | |
pub trait ToWide { | |
fn to_wide(&self) -> WideString; | |
} | |
impl ToWide for &str { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct ClassStyle(pub WNDCLASS_STYLES); | |
pub struct WindowStyle(pub WINDOW_STYLE); | |
macro_rules! impl_ops_for_all { | |
($($t:ty),+) => { | |
$(impl std::ops::BitOr for $t { | |
type Output = Self; | |
fn bitor(self, rhs: Self) -> Self::Output { | |
Self(self.0 | rhs.0) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_export] | |
macro_rules! display { | |
( $($t:tt)* ) => { | |
{ | |
use std::io::Write; | |
let mut out = std::io::stdout(); | |
write!(out, $($t)* ).unwrap(); | |
write!(out, "\n").unwrap(); | |
out.flush().unwrap(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# GBA development kit | |
# | |
FROM devkitpro/devkitarm:latest as devkit | |
# | |
# Idris build process | |
# | |
FROM dgellow/idris2:v0.3.0 as base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "main.h" | |
#include <windows.h> | |
#include <stdio.h> | |
#include "RemoteThread.h" | |
#include "ProcessInfo.h" | |
#include "Hidden.h" | |
/* Hidden contains things like: | |
// ReadProcessMemory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <utility> | |
// Deferred allows you to ensure something gets run at the end of a scope | |
template <class F> | |
class Deferred { | |
public: | |
explicit Deferred(F f) noexcept : fn(std::move(f)) {} | |
Deferred(Deferred&& other) noexcept : fn(std::move(other.fn)), called(std::exchange(other.called, false)) {} | |
Deferred(const Deferred&) = delete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
const char* ssid = "<REDACTED>"; | |
const char* password = "<REDACTED>"; | |
auto port = 80; | |
ESP8266WebServer server(port); |
NewerOlder