Skip to content

Instantly share code, notes, and snippets.

@P4
P4 / RLE.asm
Last active Aug 29, 2015
Implementacja Run-Length-Encoding (RLE)
View RLE.asm
; Pawel Maniecki
; Asemblery, IET AGH
.186 ; pusha, popa
BUFSIZE = 4000h ; rozmiar bufora: 4*16*256 = 16*1024 = 16 KiB
_Dane segment
; Argumenty linii komend
argc db 0 ; ilosc argumentow ( dlugosc args )
View ASCII-Art.asm
; Pawel Maniecki
; Asemblery, IET AGH
.186 ; pusha, popa
_Dane segment
; Argumenty
argc db 0 ; ilosc argumentow ( dlugosc args )
args dw 10h dup(?) ; offsety na poczatki argumentow w argv
@P4
P4 / foreach.py
Last active Dec 14, 2015
Re-implement Python's for statement using @decorator syntax
View foreach.py
#! /usr/bin/python
def foreach(iterable):
def iterate_over(func):
iterator = iter(iterable)
while True:
try:
value=next(iterator)
func(value)
@P4
P4 / default.reg
Last active May 6, 2021
Color schemes for Windows Command Prompt
View default.reg
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE
@P4
P4 / .bashrc
Last active Oct 13, 2015
.bashrc: custom prompt, aliases
View .bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Handy aliases
alias diff='~/bin/diff.py'
alias documents='cd /d/Dokumenty/'