Skip to content

Instantly share code, notes, and snippets.

@angelsl
angelsl / winapi-rdeps.js
Last active November 13, 2015 19:24
winapi-rdeps
var rdeps = { "nodes": [{ "id": "google-deploymentmanager2", "label": "google-deploymentmanager2" },{ "id": "prntvpt-sys", "label": "prntvpt-sys" },{ "id": "quickersort", "label": "quickersort" },{ "id": "netherrack", "label": "netherrack" },{ "id": "pam-auth", "label": "pam-auth" },{ "id": "kuchiki", "label": "kuchiki" },{ "id": "mixpanel", "label": "mixpanel" },{ "id": "k8055", "label": "k8055" },{ "id": "ualapi-sys", "label": "ualapi-sys" },{ "id": "ddp", "label": "ddp" },{ "id": "devenum-sys", "label": "devenum-sys" },{ "id": "cyborg", "label": "cyborg" },{ "id": "mstask-sys", "label": "mstask-sys" },{ "id": "blist", "label": "blist" },{ "id": "piston", "label": "piston" },{ "id": "secstr", "label": "secstr" },{ "id": "quicksort", "label": "quicksort" },{ "id": "rpcrt4-sys", "label": "rpcrt4-sys" },{ "id": "rose_tree", "label": "rose_tree" },{ "id": "twain_32-sys", "label": "twain_32-sys" },{ "id": "scirust", "label": "scirust" },{ "id": "google-sqladmin1_beta4", "label": "google-sqladmin1_beta4" },{ "id"
// compile: cl /Zl /Ox beep.c /link User32.lib Kernel32.lib /opt:ref,icf /entry:main /SUBSYSTEM:CONSOLE
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
void main() {
MessageBeep(MB_OK);
ExitProcess(0);
}
@angelsl
angelsl / a2a.py
Last active September 10, 2022 11:55
#!/usr/bin/env python2
#
# Copyright 2013 Google, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
param(
[String]$Edition = "msvc",
[String]$Destination = "C:\Tools\RustNMSVC",
[String[]]$Components = @("rustc", "cargo"),
[String]$7z = "C:\Program Files\7-Zip\7z.exe",
[String]$DownloadUrl = "https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-{0}.tar.gz"
)
function DownloadFile ($url) {
$temp = Temp
@angelsl
angelsl / Linking.md
Last active September 22, 2015 12:38

I used the code above to do try some stuff.


On overhead

For this section I used dll.c and exe.c with __declspec(dllimport) added via a macro as needed.

MSVC

diff --git a/src/lib/libssl/src/crypto/ec/ec_curve.c b/src/lib/libssl/src/crypto/ec/ec_curve.c
index 8598ee2..2d539f0 100644
--- a/src/lib/libssl/src/crypto/ec/ec_curve.c
+++ b/src/lib/libssl/src/crypto/ec/ec_curve.c
@@ -3008,6 +3008,42 @@ static const struct {
}
};
+static const struct {
+ EC_CURVE_DATA h;
Microsoft (R) COFF/PE Dumper Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file rustpg.dll
File Type: DLL
Section contains the following exports for rustpg.dll
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@angelsl
angelsl / keybase.md
Last active August 29, 2015 14:05
keybase.md

Keybase proof

I hereby claim:

  • I am angelsl on github.
  • I am angelsl (https://keybase.io/angelsl) on keybase.
  • I have a public key whose fingerprint is 1A94 FF85 BF7A 7A9D 0FC9 4CC7 5CFE 073C A7A5 68C5

To claim this, I am signing this object:

@angelsl
angelsl / Program.cs
Last active December 18, 2015 21:49
.NET NX/WZ Benchmark
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using reNX;
using reNX.NXProperties;
using reWZ;
using reWZ.WZProperties;