This file contains hidden or 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
/target |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -euo pipefail | |
df=' | |
FROM docker.io/library/debian:bullseye | |
RUN dpkg --add-architecture armhf && \ | |
apt-get update && \ | |
export DEBIAN_FRONTEND=noninteractive && \ | |
apt-get install -yq \ |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -euo pipefail | |
trap 'echo "ERROR: $BASH_SOURCE:$LINENO $BASH_COMMAND" >&2' ERR | |
for prg in notify-send khal; do | |
if ! which $prg &>/dev/null; then | |
echo $prg not found | |
exit -1 | |
fi |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Script to update DNS zones on a remote server | |
# Copyright © 2005-2007 - Julien Valroff <[email protected]> | |
# Parts of the script Copyright © 2001-2002 - Dag Wieers <[email protected]> | |
set -e -u | |
set -o pipefail | |
trap 'echo "ERROR: $BASH_SOURCE:$LINENO $BASH_COMMAND" >&2' ERR | |
RECORD="$1" |
This file contains hidden or 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 <cstdio> | |
#include <cstdlib> | |
#include <execinfo.h> | |
#include <iostream> | |
#include <stdexcept> | |
#include <unistd.h> | |
void exhnd() { | |
fprintf(stderr, __FILE__ ": Custom exception handler invoked in pid %d\n", getpid()); | |
void *trace_elems[20]; |
This file contains hidden or 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 BtOnDrop<T> { | |
inner: T | |
} | |
impl<T> BtOnDrop<T> { | |
fn new(inner: T) -> Self { BtOnDrop { inner } } | |
} | |
impl<T> std::ops::Deref for BtOnDrop<T> { | |
type Target = T; | |
fn deref(&self) -> &<Self as std::ops::Deref>::Target { &self.inner } | |
} |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
echo ' | |
FROM ubuntu:18.04 | |
RUN apt-get update && \ | |
export DEBIAN_FRONTEND=noninteractive && \ | |
apt-get install -yq \ | |
build-essential \ |
This file contains hidden or 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
let Expr | |
: Type → Type | |
= λ(A : Type) → | |
∀(Expr : Type → Type) → | |
∀(If : { cond : Text, thenE : Expr A, elseE : Expr A } → Expr A) → | |
∀(Ref : Text → Expr A) → | |
∀(Lit : A → Expr A) → | |
Expr A | |
let example |
This file contains hidden or 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
fn main() -> anyhow::Result<()> { | |
println!("{}", get_name(include_bytes!("../Class.class"))?); | |
Ok(()) | |
} | |
fn get_name(cf: &[u8]) -> anyhow::Result<String> { | |
use anyhow::Context; | |
use classfile_parser::constant_info::ConstantInfo::{Class, Utf8}; | |
use classfile_parser::constant_info::ClassConstant; |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -eu | |
cd "$(dirname "$0")" | |
DOCKERF="$(cat <<EOF | |
FROM debian | |
RUN apt update && apt -yq install sudo build-essential libclang-dev clang curl # extra hoops for rdkafka | |
RUN echo 'rust ALL=(ALL:ALL) NOPASSWD:ALL' >>/etc/sudoers |