Skip to content

Instantly share code, notes, and snippets.

View cyjico's full-sized avatar
🏫

cyjico cyjico

🏫
  • a dew a deer
  • 12:57 (UTC +08:00)
View GitHub Profile
@cyjico
cyjico / integrating-prettier-with-eslint.md
Last active November 21, 2024 13:09
How-to file for integrating Prettier with ESLint for Visual Studio Code

Integrating Prettier with ESLint

Integrating Prettier with ESLint for Visual Studio Code.

Prerequsities:

  1. Install Prettier and prettier-eslint
@cyjico
cyjico / feverish.asm
Last active November 2, 2024 16:54
Requires Microsoft Macro Assembler (MASM)
.386 ; compiled for Intel 80386 or later and 32-bit instructions and addressing should be used.
.model flat,stdcall ; memory is a single contiguous address space and use standard calling convention of procedures.
.stack 4096 ; reserve 4096 bytes for the "stack".
ExitProcess PROTO dwExitCode:DWORD ; prototype of "ExitProcess" procedure has the parameter of a DWORD "dWExitCode".
.data
; <variable_name> <variable_type> <variable_value>
farenheit REAL4 170.0 ; REAL4 is a 4-byte (32-bits) floating-point number.
THIRTY_TWO REAL4 32.0
@cyjico
cyjico / calculator.cpp
Last active April 28, 2021 04:56
Evaluating an infix expression through postfix conversion
#include <iostream>
#include <stack>
using namespace std;
double Evaluate(string input);
int GetTokenPrecedence(char c);
double ApplyOperator(double a, double b, char op);
int main(int argc, char* argv[])
{
@cyjico
cyjico / brainfudge-interpreter.cpp
Last active April 11, 2020 10:36
Brainfudge Interpreter
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void Interpret(string input, vector<uint8_t> &memory);
int main()
{
vector<uint8_t> memory{ 0 };