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
struct Context { | |
_inner: *mut std::ffi::c_void, | |
} | |
impl Drop for Context { | |
fn drop(&mut self) { | |
println!("drop: Context") | |
} | |
} |
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
#![allow(dead_code, unused_variables, clippy::from_over_into)] | |
struct Inner { | |
raw: *mut [u8; 0], | |
} | |
struct Object { | |
inner: Inner, | |
} |
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
/** | |
* https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/devtools/+/eb375f3b31a67df908c93a827dd9e78d3212be60/front_end/product_registry_impl/sha1/sha1.js | |
*/ | |
/* | |
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined | |
* in FIPS 180-1 | |
* Version 2.2 Copyright Paul Johnston 2000 - 2009. | |
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet | |
* Distributed under the BSD License |
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 { useState, useEffect } from "preact/hooks" | |
type Listener<T> = (state: T) => void | |
type Updater<T> = (state: T) => T | |
type Context<T> = { | |
setState(update: T | Updater<T>): void | |
subscribe(listener: Listener<T>): void | |
unsubscribe(listener: Listener<T>): void | |
getState(): T | |
} |
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
class Flavoring<FlavorT> { | |
private _flavor?: FlavorT; | |
} | |
type Flavor<Base, Flavor> = Base & Flavoring<Flavor>; | |
type i32 = Flavor<number, 'i32'> | |
type i64 = Flavor<number, 'i64'>; | |
const a: i32 = 1 |
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
version: '3.8' | |
services: | |
varnish: | |
image: varnish:stable | |
volumes: | |
- type: bind | |
source: ./varnish | |
target: /etc/varnish | |
read_only: true | |
tmpfs: /var/lib/varnish:exec |
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
# https://github.com/messense/homebrew-macos-cross-toolchains | |
brew tap messense/macos-cross-toolchains | |
brew install x86_64-unknown-linux-gnu | |
export CC_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-gcc | |
export CXX_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-g++ | |
export AR_X86_64_UNKNOWN_LINUX_GNU=x86_64-unknown-linux-gnu-ar | |
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc |
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
# https://github.com/messense/homebrew-macos-cross-toolchains | |
brew tap messense/macos-cross-toolchains | |
brew install aarch64-unknown-linux-musl | |
export CC_AARCH64_UNKNOWN_LINUX_MUSL=aarch64-unknown-linux-musl-gcc | |
export CXX_AARCH64_UNKNOWN_LINUX_MUSL=aarch64-unknown-linux-musl-g++ | |
export AR_AARCH64_UNKNOWN_LINUX_MUSL=aarch64-unknown-linux-musl-ar | |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-unknown-linux-musl-gcc |
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
CUR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) | |
NULL := /dev/null | |
define touch | |
@mkdir -p $(@D); touch $(@) | |
endef | |
.DEFAULT_GOAL := help | |
help: ## Self-documented Makefile |
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
main() | |
async function main() { | |
const tasks = [] | |
tasks.push(fail()) | |
// Commenting out this line makes it work | |
await new Promise((resolve) => setTimeout(resolve, 0)) |
NewerOlder