Skip to content

Instantly share code, notes, and snippets.

View riverar's full-sized avatar

Rafael Rivera riverar

View GitHub Profile

Keybase proof

I hereby claim:

  • I am riverar on github.
  • I am rafael (https://keybase.io/rafael) on keybase.
  • I have a public key whose fingerprint is 3E18 3879 1DB0 7B7C A2B5 F94F 050B 5707 E2BF 6D6A

To claim this, I am signing this object:

@riverar
riverar / gist:4052f4a792ad2b784f8f
Created May 28, 2014 20:33
Diff of TrueCrypt 7.1a and "TrueCrypt 7.2" sources
--- Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
+++ Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
@@ -75,7 +75,9 @@
#endif // TC_WINDOWS_BOOT_RESCUE_DISK_MODE
- PrintEndl (3);
+ PrintEndl (2);
+ Print ("WARNING: Using TrueCrypt is not secure");
+ PrintEndl (2);
@riverar
riverar / gist:fd6525579d6bbafc6e48
Last active December 10, 2022 08:08
C# structures to implement "Aero Glass" blur on Windows 10
[DllImport("user32.dll")]
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
[StructLayout(LayoutKind.Sequential)]
internal struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}
@riverar
riverar / gist:53c2d7293c15e1acc7d7
Created July 8, 2015 19:53
Contrived C#/WPF example implementing "Aero Glass" blur on Windows 10
internal void EnableBlur()
{
var windowHelper = new WindowInteropHelper(this);
var accent = new AccentPolicy();
var accentStructSize = Marshal.SizeOf(accent);
accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND;
var accentPtr = Marshal.AllocHGlobal(accentStructSize);
Marshal.StructureToPtr(accent, accentPtr, false);
@riverar
riverar / skype.js
Created July 26, 2015 09:45
My first Frida script to fix up Skype's ShellExecuteExW usage
var g_openVerbString = Memory.allocUtf16String("open");
var fn = Module.findExportByName("shell32.dll", "ShellExecuteExW");
Interceptor.attach(fn, {
onEnter: function(args) {
// Right now, SHELLEXECUTEINFO presumably looks like:
// ...
// lpVerb = nullptr
// lpFile = RUNDLL32.EXE
@riverar
riverar / made_by_you_display_scaling.html
Created January 8, 2016 17:29
Made by you - Display Scaling in Windows 10
<p>Today we are introducing a new series of articles titled ‘Made by you’. If you have feedback on this type of content or other aspects of the Windows Insider Program, please let us know via the <a href="windows-feedback:?contextid=529" target="_blank">Feedback App</a>.&nbsp;&nbsp;</p>
<p>‘Made by you’ highlights how we are addressing feedback from Windows Insiders, how we investigated this feedback to shape Windows, and why we have made&nbsp;these improvements.</p>
<h3>Overview/Introduction </h3>
<p>Windows 10 is an important release for Windows display scaling. It implements a unified approach to display scaling across all SKUs and devices aimed at these goals: </p>
<ol>
<li>Our end users enjoy a mix of UWP and classic desktop applications on desktop SKUs which reliably provide content at a consistent size </li>
@riverar
riverar / inside_wdg_1.html
Last active February 10, 2016 18:36
Inside WDG - Branches and Rings
<h1>Inside WDG - Branches and Rings</h1>
<p>Today, we’re kicking off a new series of articles we’ll publish regularly to Insider Hub called Inside WDG. WDG is short for the Windows and Devices Group which is the group at Microsoft responsible for Windows as well as Microsoft’s devices such as Surface, Xbox, Lumia, and Band. And with Inside WDG, we want to give Insiders a behind-the-scenes look at how we’re building Windows. It will also give us the opportunity go into greater detail on specific topics that we know are of interest to Insiders. For our first Inside WDG article, we’re going to talk about our Windows branches and rings.</p>
<p>Throughout Windows 10 development and over the past year of the Windows Insider Program, we have evolved how we develop and release Windows. We have learned a lot from our Windows Insiders and customers and have made significant improvements to our product and the tools we use to develop them. Therefore, we would like to take the time to give Windows Insiders some backgrou
@riverar
riverar / inside_wdg_localization.html
Created April 4, 2016 22:02
Inside WDG - Localization Process
<p>Hello Windows Insiders!</p>
<p>My name is Miki Albertson and I’m a Program Manager from Windows Localization team. Today I would like to give you a behind-the-scenes look at how WDG products are made available to Windows Insiders in their language. By the way, we call this process “Localization”.</p>
<p>If you have ever wondered about how our products are made available in your markets and in your language, please read on!"</p>
<p>This is a simplified view, but it will give you an overview into main aspects of Localization process.</p>
<p>Each process is explained in detail below. </p>
@riverar
riverar / made_by_you_cortana.html
Created April 8, 2016 17:48
Made by You - Cortana listens to your feedback!
<h3>Introduction </h3>
<p>Cortana is really smart, but she isn’t perfect. Cortana does automatically get better, so just using Cortana is a great way to help. In fact, the more you use Cortana the better she gets for everybody. But your feedback is absolutely critical. Feedback helps us identify issues and focus attention to the most urgent needs.</p>
<p>In this article, we’ll show you how to give feedback about Cortana, what we do every day with that critical feedback, and provide real examples where feedback has impacted changes to Cortana.</p>
<h3>Cortana Feedback (How it works and what we do with it) </h3>
<p>One of the key sources of feedback comes from within the Cortana experience. You can provide ideas, likes and dislikes to our team. Each report is recorded by our system, including a screenshot (if you allow), as well as few key details such as the Windows language used. </p>
@riverar
riverar / dummy.exe.manifest
Created May 30, 2016 17:04
Long Path Aware sample manifest
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<longPathAware>true</longPathAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>