Skip to content

Instantly share code, notes, and snippets.

View biske's full-sized avatar

Ivan Bisevac (Иван Бишевац) biske

View GitHub Profile
@FrankHassanabad
FrankHassanabad / search_after_with_pit.md
Last active March 4, 2024 18:40
Search after with a PIT
# Creat a PIT (Point in Time)
POST /auditbeat-8.0.0/_pit?keep_alive=10m

# First page of 2 items (no "search_after" specified)
GET /_search
{
  "size": 2, 
  "pit": {
 "id": "46ToAwEhYXVkaXRiZWF0LTguMC4wLTIwMjIuMDIuMTQtMDAwMDAxFmI2ZEk1NnMtUlZxM25hY3ZkeUVnN2cAFk0tblloZ2RYUjVDWUJLQUhYUHNmdHcAAAAAAAAEnSMWR0NfVWdlakZSSEszcGVzbXpfSTdoZwABFmI2ZEk1NnMtUlZxM25hY3ZkeUVnN2cAAA==",
@srmds
srmds / Installing wkhtmltopdf 0.12.6, 0.12.5, 0.12.4 - Ubuntu 22.06 , 18.04, 16.04 x64, 0.12.6 - MacOS Ventura 13.6.md
Last active June 14, 2024 13:47
Installing wkhtmltopdf 0.12.4, 0.12.5 0.12.6 - Ubuntu 22.04 - 0.12.6, 16.04 x64, 0.12.5 - Ubuntu 18.04 x64 - 0.12.5 - macOS Ventura -13.6
@grakic
grakic / ePorezi-macOS.md
Last active July 1, 2024 14:20
ePorezi na macOS

ePorezi na macOS

Zvanična klijentska aplikacija Poreske uprave se može preuzeti sa njihove stranice.

U pitanju je Java aplikacija koja dolazi sa posebno priređenom distribucijom Oracle Java radnog okruženja. Aplikacija podržava samo Microsoft Windows operativni sistem i sertifikatima u Personals skladištu pristupa kroz Microsoft CryptoAPI koji poziva operacije na pametnoj kartici ili tokenu posredstvom midlvera.

Sertifikaciono telo Pošte korisnicima nudi SafeSign midlver, osim u verziji za Windows i u verziji za GNU/Linux i macOS operativne sisteme. Midlver isporučuje prateću aplikaciju za upravljanje karticom/tokenom i PKCS#11 biblioteku. Programi poput jSignPDF, Adobe Reader ili LibreOffice mogu da učitaju ovu biblioteku i omoguće korisniku elektronsko potpisivanje dokumenata.

Elektronsko potpisivanje se koristi i na portalu ePorezi Poreske uprave, posredstvom pomenute klijentske aplikacije.

# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@midu
midu / template.rb
Created September 4, 2013 20:17 — forked from jnicklas/template.rb
require "minitest/autorun"
require "capybara"
class TestNthChild < Minitest::Unit::TestCase
def setup_with_html(html)
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] }
session = Capybara::Session.new(:rack_test, app)
session.visit("/")
return session
require "capybara"
html = DATA.read
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] }
sess = Capybara::Session.new(:selenium, app)
sess.visit("/")
__END__
@mattconnolly
mattconnolly / gist:4158961
Created November 28, 2012 04:04
RSpec basic authentication helper module for request and controller specs
module AuthHelper
def http_login
user = 'username'
pw = 'password'
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw)
end
end
module AuthRequestHelper
#
@dalibor
dalibor / rspec_cucumber_learning.markdown
Created August 22, 2012 07:46 — forked from nebojsaz/rspec_cucumber_learning.markdown
Rspec + Cucumber how to on Codebreaker example

Behavior Driven Development

Description of BDD

  • Domain-driven design

Principles of BDD

  • Enough is enough
@terryjray
terryjray / gist:3296171
Created August 8, 2012 15:55
Enabling hstore for new postgresql 9.1 and rails 3 install on ubuntu 12.04
RAILS_ENV=production rake db:setup
# produces the error below.....hmmm.....it's a no-worky
psql:/yourprojectpath/yourproject/db/structure.sql:29: ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
# hstore postgresql extension needs to be installed, so....
sudo apt-get install postgresql-contrib
# now your extension should be available to enable so log in with psql
psql -d yourproject_production -U yourdbuser -W