Skip to content

Instantly share code, notes, and snippets.

💭
💾

Fırat Salgür neuro-sys

💭
💾
Block or report user

Report or block neuro-sys

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@neuro-sys
neuro-sys / 0-typeorm-partial-saving.ts
Last active Dec 4, 2019
Comparison of Sequelize and TypeORM high-level (simplest) APIs and the generated SQLs
View 0-typeorm-partial-saving.ts
////////////////////////// TEST /////////////////////////
console.log('* Finding original document');
const myentitySet = await repository.findOneOrFail({
select: [ 'id', 'version' ],
where: { id: params.id },
});
console.log('* Found original document');
Object.assign(myentitySet, {
name: 'fooobar123',
});
View gra-test-abs.sym
000001 0000 (8000) org &8000
000004 8000 DD 66 00 ld h, (ix+0)
000005 8003 DD 6E 00 ld l, (ix+0)
000006 8006 DD 56 00 ld d, (ix+0)
000007 8009 DD 5E 00 ld e, (ix+0)
000008 800C CD F0 BB call &bbf0
000009 800F 32 13 80 ld (result), a
000010 8012 C9 ret
000012 8013 00 result ds 1
View sprite-alpha-test.c
// Compile: cc minimal.c `pkg-config glew sdl2 SDL2_image --libs --cflags` -lm
// Download: https://0fps.files.wordpress.com/2013/07/terrain.png
#include <stdio.h>
#include <GL/glew.h>
#include <SDL.h>
#include <SDL_render.h>
#include <SDL_opengl.h>
@neuro-sys
neuro-sys / vlc-reset.asm
Created Nov 11, 2019
Clear vertical line counter of GA via bit 4 of Reg 2
View vlc-reset.asm
org &8000
run &8000
nolist
jp start
vsync:
ld b, &f5
in a, (c)
rra
@neuro-sys
neuro-sys / airplay.sh
Last active Nov 8, 2019
Screencast to AirPlay from Linux
View airplay.sh
#!/bin/bash
# Install avahi suite and make sure avahi-daemon is running
# Script will try to download airplay.jar jmdns.jar into /usr/local/lib, from
# https://github.com/jamesdlow/open-airplay/
if [[ ! -f "/usr/local/lib/airplay.jar" ]]; then
sudo curl -o /usr/local/lib/airplay.jar -O -L https://github.com/jamesdlow/open-airplay/releases/download/0.1.1/airplay.jar
fi;
@neuro-sys
neuro-sys / ssd1306.c
Created Oct 27, 2019
ssd1306 example with pic16f690
View ssd1306.c
/*
* File: main.c
* Author: neurosys
*
* Created on October 23, 2019, 10:27 PM
*/
#include <xc.h>
@neuro-sys
neuro-sys / hwcol.asm
Created Oct 15, 2019
32 hardware colors of Amstrad CPC
View hwcol.asm
org &8000
run &8000
jp start
HWCOLN EQU 32 ; Number of hardware colors
c1 db 0 ; Ink color index
vsync ld b, &f5
View textmode.asm
; nasm mode13.asm -fbin -omode13.com
SECTION .text
org 100h
start: mov dx, filenamez
mov al, 0
call openfile
jnc fileopened
mov dx, filenotopeneds
call printstr
jmp filedone
View mode13.asm
start: call mode13 ; Set mode 13
repeat_row: mov ax, [posx]
cmp ax, 320 ; Check if posx >= 320
jz end_xloop ; Stop
mov al, [color]
mov cx, [posx]
mov dx, [posy]
call setpixel ; Set pixel at posx, posy with color
inc byte [color] ; color += 1
@neuro-sys
neuro-sys / spider.bas
Last active Mar 2, 2019
spiderweb basic
View spider.bas
10 mode 1
15 midx=320:midy=200:s=10
20 for x=0 to midy step s
30 move midx+x, midy
40 draw midx, midy+(midy-x)
50 draw midx-x, midy
60 draw midx, midy-(midy-x)
70 draw midx+x, midy
80 next
You can’t perform that action at this time.