Skip to content

Instantly share code, notes, and snippets.

View norbekaiser's full-sized avatar

Norbert L. Ruehl norbekaiser

View GitHub Profile
@norbekaiser
norbekaiser / mathproblem.cpp
Created August 8, 2015 07:41
seems it cannot be solved with a pair of 3 numbers from this pool, however, trying more iterations might work
#include <iostream>
#include <stdlib.h>
int start=1;
int steps=2;
int max_value=15;
int main(){
@norbekaiser
norbekaiser / preprocessor_fun.h
Last active August 29, 2015 14:27 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@norbekaiser
norbekaiser / boot_sector.asm
Last active August 29, 2015 14:27
minimalistic x86 bootsector , creating a 0 filled file with the magic <55><aa>
jmp $
times 508 db 0
dw 0xaa55
@norbekaiser
norbekaiser / huhu.asm
Last active August 29, 2015 14:27
nasm to print out huhu , via intterupt 10/ah from the bios teletype routine
mov ah, 0x0e ; set reg ah to 0x0e to inidcate teletype mode ,
mov al,'H' ; al needs to be the (ascii)value to print
int 0x10 ;required interrupt
mov al,'u'
int 0x10
mov al,'h'
int 0x10
mov al,'u'
int 0x10
jmp $;//inf loop current line
@norbekaiser
norbekaiser / hu.asm
Last active August 29, 2015 14:27
prints out hu with a line of stars above and beyond
mov ah, 0x0e ; teletype
mov al,'*' ; ascii
times 20 int 0x10 ; call 20 times interrupt 10 to print 20 *
; newline
mov al,0x0a ;Linefeed
int 0x10
mov al,0x0d ;Cariage return
int 0x10
;
mov al,'H'
@norbekaiser
norbekaiser / hu_calls.asm
Last active August 29, 2015 14:27
hu asm , with calls
mov ah, 0x0e
call starline
call newline
mov al,'H'
int 0x10
mov al,'u'
int 0x10
call newline
call starline
infloop:
@norbekaiser
norbekaiser / bochsrc
Last active August 29, 2015 14:27
make it bootable
floppya: 1_44=boot.bin, status=inserted
boot: a
@norbekaiser
norbekaiser / hu_ittcalls.asm
Last active August 29, 2015 14:27
using a for loop to print 20 times '*'
mov ah, 0x0e
call starline
call newline
mov al,'H'
int 0x10
mov al,'u'
int 0x10
call newline
mov al,'*'
call doit20
jmp shutdown
infloop:
jmp $
shutdown:
mov ah,0x53
mov al,0x07
mov bx,0x01
mov cx,0x03
int 0x15
times 510-($-$$) db 0
@norbekaiser
norbekaiser / login-firsttimepi.sh
Last active October 8, 2015 14:22
Raspberry Pi Kurs
ssh pi@raspberrypi #sofern der dhcp in eurem netzwerk dies richtig zuordnet müsste es möglich sein sich so einzuloggen
ssh pi@ip.adresse #alternativ die ip adresse des pis nutzen, die rc.local sorgt dafür dass diese beim hochfahren angezeigt wird