This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CLI | |
sudo apt update -y | |
sudo apt install -y \ | |
git curl btop \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ | |
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
rbenv apache2-utils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller } from '@hotwired/stimulus' | |
export default class extends Controller { | |
static classes = ['highlight'] | |
connect () { | |
this.element | |
.querySelector(`a[name='${window.location.hash.slice(1)}']`) | |
?.parentElement?.classList?.add(...this.highlightClasses) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When additional headers need to be forwarded into upstream than lua nginx module should be used. | |
# The simplest way to have lua support in nginx is to use openresty (https://openresty.org/en/). | |
# After sources are downloaded and extracted from the archive we can compile openresty | |
# (or nginx with `lua`, `cjson` and `http_ssl` modules can be compiled): | |
./configure --prefix=/home/marek/epos/openresty --with-http_ssl_module | |
make | |
make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In the scope of first prototype nginx with http_auth_request, http_ssl module is used. | |
# At the beginning nginx need to downloaded (http://nginx.org/en/download.html), next configured and installed: | |
./configure --prefix=/home/marek/epos/nginx --with-http_auth_request_module --with-http_ssl_module | |
make | |
make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './lib/exporters/experiment_exporter' | |
module Api | |
module V1 | |
class ExperimentExporterController < Api::ApiController | |
include ActionController::Live | |
def show | |
authorize! :read, :experiment_exporter | |
# experiment_id = params[:id] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plug 'elixir-lang/vim-elixir' | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'janko-m/vim-test' | |
Plug 'scrooloose/nerdtree' | |
Plug 'rking/ag.vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add following line into "Settings - User" (Preferences->Settings - User) | |
"atomic_save": false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
module Global | |
extend self | |
def self.configure(&block) | |
instance_eval(&block) | |
end | |
def [](key) | |
config[key] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OauthController < ApplicationController | |
class ApiOAuthError < StandardError | |
attr_accessor :code, :description, :uri, :state | |
def initialize(code, description, uri = nil, state = nil) | |
@code = code | |
@description = description | |
@uri = uri |