Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0"?>
<Language ID="Chinese" Ver="1.0.0">
<Main1>
<le0> سیستم مدیریت تولید SG6 </le0>
<le1> چین J.S Corrugating Machinery Co.، Ltd. </le1>
<le2> لین </le2>
<le3> Cor </le3>
<le4> کاغذ </le4>
<le5> وب </le5>
<le6> متر </le6>
@id4ehsan
id4ehsan / enc28j60.h
Created September 4, 2020 18:07
enc28j60 driver header file
#ifndef ENC28J60_H
#define ENC28J60_H
//********************************************************************************************
//
// File : enc28j60.h Microchip ENC28J60 Stand-Alone Ethernet Controller with SPI™ Interface
// Created: 4/10/2020 12:41:08 PM
// Author: Ehsan Ghasemlou
// enc28j60.h
// Copyright © 2020 Ehsan Ghasemlou. All rights reserved.
//
@id4ehsan
id4ehsan / regxpattern.txt
Last active September 4, 2020 14:07
regex patttern
function prototype pattern
([a-z]+)( +[a-z]+){0,1}\s+((\*)?[a-z0-9_]+)\s*\(.*\);
cbi\((.+),(.+)\)
\1 &= ~(1<<\2)
_BV\((.*)\)
(1<<\1)
uint8_t
@id4ehsan
id4ehsan / disable_hyper-v.txt
Created July 23, 2019 12:13
disable hyper-v
Disable the group policy setting that was used to enable Credential Guard.
On the host operating system, click Start > Run, type gpedit.msc, and click Ok. The Local group Policy Editor opens.
Go to Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security.
Select Disabled.
Go to Control Panel > Uninstall a Program > Turn Windows features on or off to turn off Hyper-V.
Select Do not restart.
Delete the related EFI variables by launching a command prompt on the host machine using an Administrator account and run these commands:
mountvol X: /s
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
@id4ehsan
id4ehsan / math.c
Created March 31, 2019 02:19
some math function in c which i wrote 10 years ago
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <math.h>
#define TRUE 1
#define FALSE 0
#define MAX_NUMBER 1000
#define POW_OF_e 1.00
@id4ehsan
id4ehsan / Hello.asm
Last active March 14, 2019 20:41
experimental loop boot Master Boot Record (do nothing)
; ; A simple boot sector that prints a message to the screen using a BIOS routine. ;
mov ah, 0x0e ; int 10/ah = 0eh -> scrolling teletype BIOS routine
mov al, 'H'
int 0x10
mov al, 'e'
int 0x10
mov al, 'l'
int 0x10
mov al, 'l'
int 0x10
@id4ehsan
id4ehsan / Array.java
Last active September 8, 2019 00:41
DataStructure in Java
public class Array {
public static void main(String[] args) {
int nums[] = {28, 14, 17, 30 };
}
// Array Limitation
// 1-we need to know number of elements when the array is created
// too small: can't add more element
@id4ehsan
id4ehsan / EGA-KON1.BAS
Last active March 7, 2019 20:32
converted the 437 character set contained in the EGA.CPI file into a text file
REM Conversion of ega.cpi into Sanskrit-Transliteration/5.3.1989/us
REM ==============================================================
REM EGA-KON1.BAS
REM ============
REM
COLOR 7, 1: CLS
PRINT "EGA-KON1.BAS"
PRINT "============"
PRINT
@id4ehsan
id4ehsan / 16bitmodefontviewer.php
Last active March 6, 2019 00:31
interupt 10h Ah=10h CHARACTER FONTS Viewer
<style type="text/css">
table, tr, td {
border: 0px ;
border-collapse: collapse;
}
td {
height: 10px;
width: 10px;
@id4ehsan
id4ehsan / Iran_national-ID_Checker.vbs
Last active March 2, 2019 19:54
Iranian National ID Checker in VBScript
Dim ID
Dim sub_str
Dim Counter
Dim weighted_sum
ID = "0603293344"
For Counter = 1 to 9 Step 1
sub_str = Mid(ID, Counter, 1)
weighted_sum = weighted_sum + (11-Counter)*CInt(sub_str)
Next