Skip to content

Instantly share code, notes, and snippets.

View 0017031's full-sized avatar
🎯
Focusing

fcccp 0017031

🎯
Focusing
View GitHub Profile
@0017031
0017031 / x86_asm_study
Last active August 2, 2017 04:13
x86 assembly
Bluff your way in x64 assembler - Roger Orr [ACCU 2017] [https://www.youtube.com/watch?v=RI7VL-g6J7g]
8086, 16bit Registers
- General: AX, BX, CX, DX, (8bit, e.g. AH, AL)
- Index: SI, DI, BP, SP (source index, Destination Index, base pointer, stack pointer)
- Segment: CS, DS, ES, SS (code seg, data seg, extra seg, stack seg)
- Special Purpose: IP
- Flags: status register
8087, stack ST0 ~ ST7, st0 is the top
@0017031
0017031 / gist:0d7afef837191e6653ca35a14070a527
Created May 15, 2020 09:54
Unit testing in CLion [https://youtu.be/_MhbaVtcrR0], subtitle, english, auto-translated
1
00:00:06,589 --> 00:00:14,360
to my baboons from tom de village asia and to say everywhere will be with
2
00:00:16,640 --> 00:00:24,920
hello thanks for coming thanks dmitry for introducing me a little
3
00:00:24,920 --> 00:00:31,680
@0017031
0017031 / PurgeStandbyList.cpp
Created August 26, 2020 04:04 — forked from bitshifter/PurgeStandbyList.cpp
Command line utility for purging Window's standby list. Requires /MANIFESTUAC:"level='highestAvailable'.
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L)
typedef enum _SYSTEM_INFORMATION_CLASS {
SystemMemoryListInformation = 80, // 80, q: SYSTEM_MEMORY_LIST_INFORMATION; s: SYSTEM_MEMORY_LIST_COMMAND (requires SeProfileSingleProcessPrivilege)
} SYSTEM_INFORMATION_CLASS;
@0017031
0017031 / JetbrainsEvaluationReset_2020.py
Created December 8, 2022 08:06 — forked from mreyesv/JetbrainsEvaluationReset_2020.py
[Activate] A Python Script To Reset The Evaluation License Of These Jetbrains Products Released In 2020 Or Later (IntelliJIdea, CLion, Rider, PyCharm, RubyMine, GoLand )
# Reset Jetbrains 2020 Products
import glob
import os
import winreg
from os import path
from os.path import expanduser
home = expanduser("~")
newJetbrainsHome = path.join(home, "AppData\Roaming\JetBrains")
@0017031
0017031 / endianness.h
Created October 16, 2020 03:39 — forked from jtbr/endianness.h
cross-platform / cross-compiler standalone endianness conversion
/**
* @file endianness.h
* @brief Convert Endianness of shorts, longs, long longs, regardless of architecture/OS
*
* Defines (without pulling in platform-specific network include headers):
* bswap16, bswap32, bswap64, ntoh16, hton16, ntoh32 hton32, ntoh64, hton64
*
* Should support linux / macos / solaris / windows.
* Supports GCC (on any platform, including embedded), MSVC2015, and clang,
* and should support intel, solaris, and ibm compilers as well.
@0017031
0017031 / DirectoryException.cpp
Created August 24, 2016 11:22 — forked from colltoaction/DirectoryException.cpp
A simple C++ class that reads files in a directory, and also works as an example of RAII.
#include "DirectoryException.h"
DirectoryException::DirectoryException(const std::string& what_arg)
: std::logic_error(what_arg) {
}
@0017031
0017031 / case-sensitive-seach.js
Created January 6, 2017 05:25 — forked from borisdiakur/case-sensitive-seach.js
Bookmarklet for case-sensitive search in Google Chrome (and other browsers which do not ship this feature). You can find install instruction below the code.
(function () {
'use strict';
var body = document.body,
html = document.documentElement;
var docHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
var findingColor = 'limegreen';
@0017031
0017031 / !portable-msvc.md
Last active August 1, 2023 10:33 — forked from mmozeiko/!README.md
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

Forked from: https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cde9977

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK
(MANIFEST_URL = "https://aka.ms/vs/17/release/channel")
(https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history)

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

open System
open System.Diagnostics
type InteractionF<'f> =
| Get of (string -> 'f)
| Put of string * 'f
with
static member map f = function
| Get g -> Get (f << g)
| Put (s, g) -> Put (s, f g)
@0017031
0017031 / running.fs
Created February 27, 2024 07:57 — forked from thomasd16/running.fs
Full Trampoline monad
//This just weves the prepareStackFree function in through the running function
//what we end up with is what looks like a nested monad
type 't Running =
|Result of 't
|Step of (unit->'t Running)
type 't RunningBuilder = RunningBuilder of ((('t->'t RunningBuilder) list)->'t Running)
type RunningMonad() =
member this.Bind(RunningBuilder expr,fn) =
RunningBuilder(fun stack-> Step(fun()->expr(fn::stack)))
member this.Delay(fn) =