Skip to content

Instantly share code, notes, and snippets.

View alexander-lazarov's full-sized avatar

Alexander Lazarov alexander-lazarov

  • Sofia, Bulgaria
  • 10:41 (UTC +03:00)
View GitHub Profile
# lines = File.readlines('test-malyk.csv')
lines = File.readlines('test.csv')
ANGLE = 2 * Math::PI
ANGLE_STEPS = 256
RADIUS_STEPS = 400.0
RADIUS = 8.0
lines = lines.map.with_index do |line, j|
line.split(',').map.with_index do |measurement, i|
Important notes:
1. Please run this command only during the night when load on the server is low
2. This loads all index files and documents from the opendata portal
3. The script saves your last download time and downloads only those files that are marked as updates after
4. Expected download size should be about 6G
Steps:
1. Open https://kais.cadastre.bg/bg/OpenData
2. Open DevTools
3. Find the second Fetch/XHR call to https://kais.cadastre.bg/bg/OpenData/Read (the one with payload)
@alexander-lazarov
alexander-lazarov / vim-cheatsheet.md
Last active April 2, 2018 07:26
Vim Cheatsheet

Map ,t to save current file and run a command

:map ,t :w\|:!rake<cr>

Toggle autocomplete

<C-n>
@alexander-lazarov
alexander-lazarov / about.md
Last active April 2, 2018 07:56 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@alexander-lazarov
alexander-lazarov / install_imagemagick_6.sh
Last active May 19, 2018 20:51
latest 6.x imagemagick
brew install imagemagick@6
brew link imagemagick@6 --force
# brew install https://github.com/Homebrew/homebrew-core/raw/7efe381f290b472950ad4d1b25e3e4db58a58dd7/Formula/imagemagick.rb
# ## if you get a missing PNG library error install with --from-source option
# # brew install https://github.com/Homebrew/homebrew-core/raw/7efe381f290b472950ad4d1b25e3e4db58a58dd7/Formula/imagemagick.rb --from-source
# brew switch imagemagick 6.9.7-1
@alexander-lazarov
alexander-lazarov / Dockerfile
Last active March 16, 2016 22:09
Attempt to fix Xvfb-run crash when running selenium images
# replace with the specific selenium image you use
# the problem is with Xvfb, not the selenium server or the browser,
# so this fix should apply to all selenium images
FROM selenium/standalone-firefox
# attempt to fix this issue:
# https://github.com/SeleniumHQ/docker-selenium/issues/91
# switch to root so you can chmod the file
USER root
@alexander-lazarov
alexander-lazarov / .vimrc
Last active January 25, 2016 11:40
vimrc
if has('gui_running')
colorscheme desert
endif
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Process: python3.4 [61957]
Path: /Users/USER/*/python3.4
Identifier: python3.4
Version: ???
Code Type: X86-64 (Native)
Parent Process: bash [61785]
Responsible: iTerm [261]
User ID: 501
Date/Time: 2015-11-10 11:26:26.552 +0200