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
macro AngleVectors pitch, yaw, roll, fwd, rgt, _up { | |
virtual at fwd | |
.forward vec3_s | |
end virtual | |
virtual at rgt | |
.right vec3_s | |
end virtual | |
virtual at _up | |
.up vec3_s | |
end virtual |
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
format PE CONSOLE | |
include 'win32ax.inc' | |
entry main | |
pow = 20 | |
section '.code' code readable executable | |
proc main |
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
@echo off | |
mode con:lines=32 | |
cd \FASM | |
set include=C:\FASM\INCLUDE | |
color 0a | |
echo Compiling: %* | |
echo. | |
echo. | |
FASM.EXE %* | |
echo. |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define inline __inline | |
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) | |
typedef struct { | |
double x, y; | |
} point_t; |
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
;EAX - Input | |
;ECX - Result | |
mov ecx, -1 | |
mov edx, -1 | |
@@: | |
add edx, 2 | |
inc ecx | |
sub eax, edx | |
jns @b | |
ret |
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
DWORD GetProcessIdByName(char *name) { | |
PROCESSENTRY32 pe; | |
pe.dwSize = sizeof(pe); | |
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); | |
Process32First(hSnapshot, &pe); | |
do { | |
if(!strcmp(pe.szExeFile, name)) | |
break; | |
} while(Process32Next(hSnapshot, &pe)); |
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
#include <iostream> | |
#include <string> | |
#include <conio.h> | |
using namespace std; | |
template<typename T> | |
class password { | |
public: | |
template<typename T> |
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
;64 bit verison | |
proc INETWorker_Munge buf, len, npacket | |
mov r13d, r8d | |
xor eax, eax | |
not r13d | |
shr edx, 2 ;div 4 | |
jz @f | |
.loop: | |
and al, 0x3F | |
mov r15d, [rcx] |
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
import os | |
import numpy as np | |
from collections import deque | |
clear = lambda: os.system('cls' if os.name=='nt' else 'clear') | |
class TuringTape: | |
def __init__(self, initial_data, empty_symbol): | |
self.data = deque(initial_data) | |
self.base_offset = 0 |
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
//https://geektimes.ru/post/255488/ | |
#include <IRremote.h> | |
#define IR_KEY_POWER 0x807F08F7 | |
#define IR_KEY_MENU 0x807FA857 | |
#define IR_KEY_VOLUME_MORE 0x807F708F | |
#define IR_KEY_VOLUME_LESS 0x807FF00F | |
#define IR_KEY_PROGRAM_NEXT 0x807F30CF | |
#define IR_KEY_PROGRAM_PREV 0x807FB04F |
OlderNewer