use libloading;
fn call_dynamic() -> Result<u32, Box<dyn std::error::Error>> {
unsafe {
let lib = libloading::Library::new("/home/com/dev/cpp/libhello.so")?;
let func: libloading::Symbol<unsafe extern "C" fn() -> u32> = lib.get(b"hello")?;
Ok(func())
}
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
#!/bin/bash | |
# initial install | |
sudo apt install -y \ | |
virt-manager remmina htop vim meson nvme-cli smartmontools \ | |
gcc-arm-none-eabi cmake build-essential lm-sensors bison flex lemon fossil libssl-dev \ | |
git git-lfs subversion valgrind curl openssh-server libsecret-1-dev debuginfod elfutils \ | |
zsh-autosuggestions zsh-syntax-highlighting linux-tools-common linux-tools-`uname -r` \ | |
# chsh | |
chsh -s /bin/zsh |
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
function parse(rawInfo) { | |
if (rawInfo.decode_key) { | |
rawInfo.decode_key = rawInfo.decode_key.split('-') | |
} | |
return rawInfo; | |
} | |
function decode(info, image, canvas) { | |
const d2 = canvas.getContext("2d"); | |
canvas.width = image.width; |
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
List() | |
var list = Immutable.List([1,2,3]) | |
// [1, 2, 3] | |
List.isList() | |
Immutable.List.isList(list) | |
// true | |
List.of() | |
var list = Immutable.List.of(1,2,3); |
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
diff -rupN a/gdb/Makefile.in b/gdb/Makefile.in | |
--- a/gdb/Makefile.in 2017-05-30 02:55:35.000000000 +0200 | |
+++ b/gdb/Makefile.in 2017-05-30 02:56:48.000000000 +0200 | |
@@ -658,6 +658,7 @@ ALL_64_TARGET_OBS = \ | |
# All other target-dependent objects files (used with --enable-targets=all). | |
ALL_TARGET_OBS = \ | |
armbsd-tdep.o arm.o arm-linux.o arm-linux-tdep.o \ | |
+ arm-3ds-tdep.o \ | |
arm-get-next-pcs.o arm-symbian-tdep.o \ | |
armnbsd-tdep.o armobsd-tdep.o \ |
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
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger (doppelheathen@gmail.com) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
I hereby claim:
- I am jonirrings on github.
- I am jonirrings (https://keybase.io/jonirrings) on keybase.
- I have a public key ASCrCmLQSg5YeyZeRlBt7y-vbRO_VS-j-WhO-wykZ0EClwo
To claim this, I am signing this object:
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 UserType = new GraphQLObjectType({ | |
name: 'User', | |
description: 'a user', | |
fields: () => ({ | |
id: { | |
type: new GraphQLNonNull(GraphQLID), | |
description: 'user id', | |
}, | |
name: { | |
type: new GraphQLNonNull(GraphQLString), |