Skip to content

Instantly share code, notes, and snippets.

View darjanin's full-sized avatar

Milan Darjanin darjanin

  • Vacuumlabs
  • Bratislava
View GitHub Profile
@darjanin
darjanin / priklady.rb
Created October 8, 2014 21:41
Jednoduche stredoskolske priklady v Ruby
# funkcia na nacitanie dvoch cisiel
def nacitaj_cislo(sprava = nil)
print sprava ? sprava : "Zadaj cislo: "
gets.chomp.to_i
end
def nacitaj_znak(sprava = nil)
print sprava ? sprava : "Zadaj znak: "
get.chomp[0]
end
@darjanin
darjanin / back_side.png
Last active August 29, 2015 14:14
Snake game written in JS; Created in 2011 for Webovská grafika @matfyz
back_side.png
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Paint</title>
<style id="jsbin-css">
#container { position: relative; }
#imageView { border: 1px solid #000; }
#imageTemp { position: absolute; top: 1px; left: 1px; }
</style>
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@darjanin
darjanin / cv2_17_6_2015.md
Created June 17, 2015 13:40
Pocitacove videnie 2 17.6.2015 skuska

Skupina A - 17.6.2015

  1. Ktorými príznakmi popíšeme oblastí na základe vnútra oblastí.
  2. Popíšte navigačný prístup k výberu obrazov z databázy (CBIR) a používané projekčné metódy.
  3. Popíšte postup detekcie tvárí pomocou Gaussianov.
  4. Popíšte Houghovu transformáciu pre priamky ľubovoľného smeru.
  5. Popíšte Ittiho model vizuálnej pozornosti.
  6. Popíšte metódu SURF (detektor a deskriptor).

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@darjanin
darjanin / elcappitan.md
Last active August 29, 2015 14:24
What I need to move to new installation

Preferences

  • mouse preferences

Terminal

  • terminal colors - gruvbox-dark-edited
  • vim config

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

#!/usr/bin/env ruby
require 'Matrix'
class B
attr_accessor :points
attr_reader :average
def initialize
@points = []
@average = [0, 0, 0]
@darjanin
darjanin / learning.md
Last active February 5, 2016 13:42
Learning resources