Skip to content

Instantly share code, notes, and snippets.

; 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 / RLE.asm
Last active August 29, 2015 14:01
Implementacja Run-Length-Encoding (RLE)
; 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 )
@P4
P4 / Koch.asm
Last active August 29, 2015 14:02
Rysowanie krzywej Kocha: Generowanie przez LSystem, grafika żółwia
; Pawel Maniecki
; Asemblery, IET AGH
; Zadanie 3: Rysowanie krzywej Kocha
; Maksymalna liczba iteracji dla L-systemu: 6
; Maksymalna dlugosc odcinka: 100px
ITERMAX equ 6 ; Maksymalna ilosc iteracji ( nie wieksza od 6 )
; Dlugosc napisu opisujacego krzywa Kocha dla n iteracji dana jest wzorem
; K(n) = 7 * 4^n
module tester (
//wejscia kontrolne
input clk,
input reset_n,
//interfejs do debugowania
output [1:0] dbg_state,
output [3:0] dbg_r0,
output [3:0] dbg_r1,
output [3:0] dbg_pc
@P4
P4 / main-template.c
Last active August 29, 2015 14:23
FreeRTOS
#include <stdio.h>
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
/* Library includes. */
#include "stm32f10x.h"
@P4
P4 / .bashrc
Last active October 13, 2015 08:08
.bashrc: custom prompt, aliases
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Handy aliases
alias diff='~/bin/diff.py'
alias documents='cd /d/Dokumenty/'
@P4
P4 / foreach.py
Last active December 14, 2015 17:59
Re-implement Python's for statement using @decorator syntax
#! /usr/bin/python
def foreach(iterable):
def iterate_over(func):
iterator = iter(iterable)
while True:
try:
value=next(iterator)
func(value)
@P4
P4 / create_sde_connection.py
Created October 5, 2016 22:14 — forked from odoe/create_sde_connection.py
Arcpy script to add data to mxd and publish to ArcGIS server without ArcMap
'''
Created on Feb 24, 2011
The purpose of this script is to create the SDE connection file needed to connect to your SDE
@author: rrubalcava
'''
import os, arcpy
class CreateSDEConnection:
interface Inner<T> {
value: T;
}
interface Numeric {
content: Inner<number>;
}
interface Text {
content: Inner<string>;
@P4
P4 / synology-reload.sh
Created May 8, 2019 21:26
acme.sh reloadcmd for Synology NAS; updates the certificate copies used by services with the renewed certificate, then reloads the service.
#!/bin/bash
# Let's Encrypt Certificate reload on Synology NAS
# Services configured through DSM to use a given certificate create their own copies of the certificate files.
# This script will update those copies after the original certificate is renewed.
#
# Install and configure acme.sh on the Synology NAS by following the tutorial:
# https://github.com/Neilpang/acme.sh/wiki/Synology-NAS-Guide
CERT_DIR=/usr/syno/etc/certificate