Skip to content

Instantly share code, notes, and snippets.

View ksob's full-sized avatar

Kamil Sobieraj ksob

View GitHub Profile
@ksob
ksob / gist:777472bed4cee4241b74
Created July 23, 2014 07:57
Prawn declarations print PDF
pdf.font "app/assets/fonts/verdana.ttf"
pdf.font_size 12
@background = "app/assets/declarations/vat-7.png"
#pdf.canvas { pdf.image(@background, :width => pdf.bounds.width) } if @background
pdf.image(@background, :width => pdf.bounds.width + 30, :at => [-15,pdf.bounds.height + 40])
pdf.draw_text "999999999999", :at => [50,705]
pdf.draw_text "Urząd Skarbowy w Sochaczewie", :at => [45,590]
pdf.draw_text "12345,89", :at => [430,0]
pdf.start_new_page(:layout => :portrait)
@ksob
ksob / gist:fafde8927912dc04262b
Last active August 29, 2015 14:16
installation of openport tool supporting encrypted RSA on Mac OS X 10.9.2
1. Install python 2.7.X from: https://www.python.org/downloads/
2. Install mac ports from: https://www.macports.org/install.php
3. Run commands:
su admin_user
sudo easy_install pip
sudo pip install virtualenv
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
sudo port install freetype
@ksob
ksob / gist:c7ed7a7be56c0b44a136
Last active August 29, 2015 14:17
installing ksiegarnia on ubuntu 14 VirtualBox disk (hashicorp/precise32)
1. Umieścić plik księgarni (ksiegarnia.zip) na dysku Windows.
2. W Wubi wejść w linię komend i odnaleźć ścieżkę do pliku ksiegarnia.zip na dysku Windows, który z Wubi jest dostępny pod ścieżką: /host
3. Wykonywać kolejno polecenia:
cd ~
mkdir ksiegarnia
cp /host/sciezka_do_ksiegarni/ksiegarnia.zip ./ksiegarnia
cd ./ksiegarnia/
unzip ksiegarnia.zip
@ksob
ksob / gist:a810005158db5872a14b
Created March 25, 2015 09:50
/Users/developer/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/proxy_authentication-0.1.0/lib/proxy_authentication/configuration.rb
module ProxyAuthentication
class Configuration
DEFAULT_SECRET = "api_proxy_auth_secret_key".freeze
DEFAULT_URL = "http://localhost:8080/".freeze # "https://api.sageone.com/v2/".freeze
attr_reader :secure_store
def initialize(secure_store, env)
@secure_store = secure_store.load[env, :api_proxy]
rescue Exception
@ksob
ksob / gist:740063cb8a5a808d0ccf
Created May 6, 2015 11:09
Setup install USB Ethernet adoptor on Mac OS X
http://blog.inkandfeet.com/How-To-Use-A-Generic-Usb-20-10100M-Ethernet-Adaptor-Rd9700-On-Mac-Os-1010-Mavericks
@ksob
ksob / gist:1998ab37b1ae689466dce3440c281a44
Created October 9, 2018 13:55
Compiling skorzewski / psi-toolkit on lubuntu 16
https://github.com/skorzewski/psi-toolkit
- remove lines including iayko normalizer from psi/tools/normalizers/CMakeLists.txt and some other CMakeLists.txt files that includes it (as as far as I remember there is at least one more)
- open niema_tests.cpp file and completely empty it, save
- follow all the steps for comiling on ubuntu 16
@ksob
ksob / gist:52cd8bca030e5683dde3fcc5b71601d5
Last active November 3, 2018 23:20
example of a new course
featured_courses = [
{
image: 'course-7.jpg',
price: '555',
title: 'Some new course',
grades: ['9'],
codes: ['XXX10'],
credit_value: 1.0,
instructor: 'Ms. Karen Morrison',
course_type: 'Academic - Online Delivery',
# copy latin_to_rus to pl_to_ua to add new transliteration from PL to UA; remove ё, ъ, ы and э as non exist in UA; make basic corrections
# coding: utf-8
module Ruslat
# (c) 2008 Andrey V. Lukyanov (e-mail: land@long.yar.ru)
# License: I grant anyone the right to use this program
# for any purpose, without any conditions.
#
@ksob
ksob / gist:e23d29d739d8c577f7a2f512b510dddc
Last active November 5, 2018 16:09
yandex.ua maps API usage - how to add to Ruby on rails
https://github.com/Yegorov/rails_admin_yamap_field
and / or
https://react-yandex-maps.now.sh/
----------------------
to get free api keys : https://developer.tech.yandex.ru/
#!/usr/bin/ruby -w
#
# USAGE:
#
# ruby ../rbut.rb /media/p/x_app/app/models/*.rb
#
# /***************************************************************************
# * Copyright (C) 2008, Paul Lutus *
# * Copyright (C) 2014, Carlos Puchol *