Skip to content

Instantly share code, notes, and snippets.

View bambuchaAdm's full-sized avatar

Łukasz Dubiel bambuchaAdm

View GitHub Profile
rjmp main
numbers:
.DB 70 96 -70 -96 -126 30 126 -6 -2 -5
main:
ldi ZH, HIGH(2*numbers)
ldi ZL, LOW(2*numbers)
loop:
fm = 1 % 10, 100
fc = 40e3;
omegaM = 2*pi*fm;
omegaC = 2*pi*fc;
x = @(t) sin(omegaM * t);
y = @(t) sin(omegaC * t + integral(x, 0 , t));
fs = fc*2.1;
t = 0:(1/fs):1;
s = y(t);
@bambuchaAdm
bambuchaAdm / brzydal.js
Last active August 29, 2015 14:18
Some JS
(function($){
function formLine(number){
return "<tr class='config-entry'><td headers='name'>" + number + "</td> \
<td headers='group'> \
<input class='text medium-field' type='text' id='group-name' name='" + number + ".groupName' value='{$config.groupName}'> \
</td> \
<td class='count'> \
<input class='text medium-field' type='number' id='group-count' name='" + number + ".reviewersCount' value=''> \
</td> \
@bambuchaAdm
bambuchaAdm / dft2d.m
Created March 31, 2015 07:29
CPS 2015-03-31
N=6;
M=4;
s = rand(N,M);
S = mat_dft(N) * s * mat_dft(M);
%backs = inv(mat_dft(N)) * S * inv(mat_dft(M));
backs = 1/N * conj(mat_dft(N)) * S * 1/M * conj(mat_dft(M))
err = max(abs(backs(:) - s(:)))
@bambuchaAdm
bambuchaAdm / example1.m
Last active August 29, 2015 14:17
CPS - 2015-03-24
N = 10;
x = rand(1,N);
X = x * matrixW(N);
M = N-1;
y = x(1:M);
Y = y * matrixW(M);
@bambuchaAdm
bambuchaAdm / 2D_DFT.m
Last active August 29, 2015 14:17
Mathlab functions for CPS
N = 20,
M = 20
s = rand(N,M)
S = zeros(N,M)
S = matrixW(N) * s * matrixW(M)
// (..)
int hinty[25];
gimme_hint(tablica,&hinty);
render(size,hinty,kur_x, kur_y);
static
int **
some something(int * tab,int size)
{
int ** main_tab = malloc(size * sizeof(int *));
int i=0,j=0;
for(i = 0; i < size; ++i){
main_tab[i] = malloc(tab[i] * sizeof(int));
for(j = 0; j < tab[i]; ++j){
main_tab[i][j] = j;
@bambuchaAdm
bambuchaAdm / query.scala
Created January 21, 2014 20:29
Slick things
def deleteAll(value: Seq[Model]) = {
value.foldLeft(Query(this)){ (query, model: Model) =>
query.filter(_.store === model.name)
}.delete
}
@bambuchaAdm
bambuchaAdm / openssh.log
Created December 8, 2013 16:14
Go ssh error.
OpenSSH_6.4, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /home/bambucha/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to localhost [::1] port 2223.
debug1: Connection established.
debug1: identity file /home/bambucha/.ssh/id_rsa type 1
debug1: identity file /home/bambucha/.ssh/id_rsa-cert type -1
debug1: identity file /home/bambucha/.ssh/id_dsa type -1
debug1: identity file /home/bambucha/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0