Skip to content

Instantly share code, notes, and snippets.

View elvircrn's full-sized avatar

Elvir Crnčević elvircrn

  • TU Graz
  • Graz/Sarajevo
View GitHub Profile
@elvircrn
elvircrn / tmux.conf
Created December 20, 2019 14:49
~/.tmux.conf
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
import re
import urllib
import urllib.request
import os
import concurrent.futures
import zipfile
import shutil
def download_stuff(comic_url, comic_name):

Overclocking the GPU

sudo /home/nvidia/jetson_clocks.sh --store
sudo /home/nvidia/jetson_clocks.sh
sudo /home/nvidia/jetson_clocks.sh --restore
@echo off
ghdl --clean --workdir=isim\work
ghdl --remove --workdir=isim\work
ghdl --clean --workdir=work
ghdl --remove --workdir=work
mkdir work
for /r %%i in (*.vhd) do ghdl -a --ieee=synopsys --workdir=work %%~ni.vhd
ghdl -e --ieee=synopsys --workdir=work tb_%1
ghdl -r --ieee=synopsys --workdir=work tb_%1 --vcd=%1.vcd
C:\gtkwave\bin\gtkwave %1.vcd
#pragma config FOSC = HS, WDTE = OFF, PWRTE = OFF, MCLRE = ON, CP = OFF, \
CPD = OFF, BOREN = OFF, CLKOUTEN = OFF
#pragma config IESO = OFF, FCMEN = OFF, WRT = OFF, VCAPEN = OFF, PLLEN = OFF, \
STVREN = OFF, LVP = OFF
#define _XTAL_FREQ 8000000
#include <xc.h>
volatile unsigned char id;
void init() {
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Auto reload on file change
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set autoread
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Colors
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set t_Co=256
set background=dark
@elvircrn
elvircrn / hello.asm
Last active February 17, 2018 11:13
%define main_len 16
extern printf
extern scanf
global main
section .data
LIT_1: db "%d", 0
LIT_0: db "Da li je tvoj broj %d?", 10, "", 0
LIT_2: db "Trebalo mi je %d pokusaja da pogodim broj", 10, "", 0
section .text
; ubuntu@ubuntu:~/Desktop/usr/bin$ ./nasm -f elf hello.asm
; ubuntu@ubuntu:~/Desktop/usr/bin$ gcc -o hello hello.o
; ubuntu@ubuntu:~/Desktop/usr/bin$ ./hello
; a=5, eax=7
extern printf
SECTION .data ; Data section, initialized variables
a: dd 5 ; int a=5;
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Full screen mode on start
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"run the command immediately when starting vim
autocmd VimEnter * call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)
" activate/deactivate full screen with function key <F11>
map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR>
filetype on
@elvircrn
elvircrn / test.js
Last active November 20, 2017 15:28
// Kod za validaciju ide ovdje
function testEmail() {
// Fakultetski email validation tests
console.assert(Validacija.validirajFakultetski('[email protected]') === true);
console.assert(Validacija.validirajFakultetski('elvircrnetf.unsa.ba') === false);
console.assert(Validacija.validirajFakultetski('[email protected]') === false);
console.assert(Validacija.validirajFakultetski('@etf.unsa') === false);
console.assert(Validacija.validirajFakultetski('@etf.unsa.ba') === false);
console.assert(Validacija.validirajFakultetski('') === false);