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
diff --git a/example/redblack.c b/example/redblack.c | |
index f9b247d..de77667 100644 | |
--- a/example/redblack.c | |
+++ b/example/redblack.c | |
@@ -1,6 +1,8 @@ | |
#include <stdio.h> | |
#include <stdlib.h> | |
+#include <valgrind/mctracer.h> | |
+ |
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
/* | |
Streaming speed test. | |
WTFPL! | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <signal.h> |
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
michaeli@lxhalle ~/coding | |
$ g++ -std=c++0x -O3 sha1m.cpp | |
michaeli@lxhalle ~/coding | |
$ time ./a.out | |
6e5a2b6d164557be546a0f17e441dcfafe7938a9 collides with test which is 2C000001 | |
004272ba8922de44bceef49f01dccd6f81f9b997 collides with c1 which is 2CDEC8A7 | |
real 0m28.644s | |
user 0m28.330s |
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
{- | |
- FormHelpers.hs | |
- | |
- Copyright (c) 2012 Julius Michaelis | |
- | |
- Permission to use, copy, modify, and/or distribute this software for any | |
- purpose with or without fee is hereby granted, provided that the above | |
- copyright notice and this permission notice appear in all copies. | |
- | |
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
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 config | |
somefile: config | |
cat >$@ <<<"$(CONFIGVALUE)" | |
config: config.default | |
@if [ -e config ]; then \ | |
echo Warning: default config newer than config; \ | |
else \ | |
cp -v $< $@; \ |
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
[ 198.744533] usb 4-2: new SuperSpeed USB device number 2 using xhci_hcd | |
[ 198.758302] usb 3-2: new high-speed USB device number 3 using xhci_hcd | |
[ 198.925960] usb 3-2: New USB device found, idVendor=2109, idProduct=2811 | |
[ 198.925965] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
[ 198.925967] usb 3-2: Product: USB2.0 Hub | |
[ 198.925969] usb 3-2: Manufacturer: VIA Labs, Inc. | |
[ 198.926764] hub 3-2:1.0: USB hub found | |
[ 198.927260] hub 3-2:1.0: 4 ports detected | |
[ 198.994531] usb 4-2: New USB device found, idVendor=2109, idProduct=8110 | |
[ 198.994535] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 |
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
#!/bin/bash | |
set -e -u -x | |
oldlist="" | |
declare -A idi | |
current='' # '' codes for "do nothing with that window" | |
xprop -spy -root _NET_CLIENT_LIST _NET_ACTIVE_WINDOW |\ | |
while read info; do |
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
#!/bin/bash | |
set -e -u -x | |
qemu-img create -f qcow2 ${1}.qcow2 8G | |
virt-install --connect=qemu:///session \ | |
--name=${1} \ | |
--virt-type=kvm \ | |
--ram=2048 \ |
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 |
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; |
OlderNewer