Skip to content

Instantly share code, notes, and snippets.

module Api::Views::V1::Events
class Index
include Api::View
end
@mbajur
mbajur / affix.vue
Created July 20, 2017 07:57
vue-affix with option to delay the initialization
<template>
<div>
<slot></slot>
</div>
</template>
<script>
export default {
props: {
/**
█▬█ █ ▀█▀
@mbajur
mbajur / update_production
Created November 13, 2018 10:18
Prismo updating script
echo '== Stoping the app =='
docker-compose down
echo '== Pulling changes =='
git pull
echo '== Building the image =='
docker-compose build
echo '== Removing old assets'
@mbajur
mbajur / Gemfile
Last active January 4, 2022 11:16
Liquid, Handlebars, Erb and gsub benchmarks
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem 'liquid'
gem 'ruby-handlebars'
@mbajur
mbajur / nil.rb
Created February 11, 2021 10:19
Ruby `#to_s` vs `|| ''` benchmark
require 'benchmark'
n = 100_000
Benchmark.bm do |benchmark|
benchmark.report("#to_s") do
n.times do
nil.to_s
end
end