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
000000 IDENTIFICATION DIVISION. | |
000000 PROGRAM-ID. AdvCobolAss2. | |
000000 DATA DIVISION. | |
000000 WORKING-STORAGE SECTION. | |
000000 01 TABLE-COUNT PIC 99. | |
000000 01 THE-TABLE. | |
000000 05 TABLE-ITEM | |
000000 OCCURS 1 TO 99 TIMES DEPENDING ON TABLE-COUNT PIC X(99). | |
000000 01 THE-TABLE-LENGTH. | |
000000*Apparently I have to put this in a seperate 01 clause, thus |
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
function translate([string][Parameter(valueFromPipeline=$true)]$text, $sourceLanguage, $targetLanguage){ | |
if($sourceLanguage -eq $targetLanguage){ | |
return $text | |
} | |
$url = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=$([Uri]::escapeDataString($sourceLanguage))&tl=$([Uri]::escapeDataString($targetLanguage))&dt=t&q=$([Uri]::escapeDataString($text))" | |
$response = irm $url | |
return $response[0][0][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
#I have a folder full of folders of ROMs and a folder full of No-Intro DATS. Time to stay up all night | |
#Doesn't work with zips | |
function md5($path){ | |
$md5 = [Security.Cryptography.MD5]::create("MD5") | |
$file = [IO.File]::openRead($path) | |
$buf = new-object byte[] (1024*8) | |
while (($read_len = $file.read($buf,0,$buf.length)) -eq $buf.length){ | |
[void]$md5.transformBlock($buf, $offset, $buf.length, $buf, $offset) |
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
$progman_ini = 'Y:\Dosbox\WINDOWS\PROGMAN.INI' | |
$ascii = [Text.Encoding]::ASCII | |
#TIconHeader: | |
#Hot spot X: Integer (Should be 0) | |
#Hot spot Y: Integer (Should be 0) | |
#Width: Integer | |
#Height: Integer | |
#Bytes per row accounting for word alignment (what?): Integer | |
#Number of planes: Byte |
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
VERSION 1.0 CLASS | |
BEGIN | |
MultiUse = -1 'True | |
END | |
Attribute VB_Name = "AssemblyHax" | |
Attribute VB_GlobalNameSpace = False | |
Attribute VB_Creatable = False | |
Attribute VB_PredeclaredId = False | |
Attribute VB_Exposed = False | |
Option Explicit |
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
VERSION 1.0 CLASS | |
BEGIN | |
MultiUse = -1 'True | |
END | |
Attribute VB_Name = "ByteStringBuilder" | |
Attribute VB_GlobalNameSpace = False | |
Attribute VB_Creatable = False | |
Attribute VB_PredeclaredId = False | |
Attribute VB_Exposed = False | |
Option Explicit |
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
ls *.ext | % {& $7z a -mx9 ([IO.Path]::GetFileNameWithoutExtension($_) + ".7z") $_.fullName} |
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
find . -type f -print0 | xargs -0 md5sum | sort | uniq -D -w32 |
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
#!/usr/bin/python3 | |
import sys | |
import math | |
TEXT_TABLE = {} | |
TERMINATOR_CHAR = 0x50 | |
TEXT_TABLE[TERMINATOR_CHAR] = '<terminator>' | |
#4B and 4C are unknown control chars | |
TEXT_TABLE[0x00] = '<null>' |
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
#!/usr/bin/env python3 | |
import sys | |
TERMINATOR_CHAR = 0x50 | |
TEXT_TABLE = { | |
TERMINATOR_CHAR: '<terminator>', | |
#TODO: The characters before this | |
0x7F: ' ', | |
0x80: 'A', |
OlderNewer