Skip to content

Instantly share code, notes, and snippets.

Tasks

Heading without timestamp

Heading with CLOSED timestamp

Heading with plain timestamp<2021-11-27 Sat>

Level 1

Heading with expired DEADLINE

Heading with DEADLINE

Tasks

Heading

  • 1
  • 2
  • 3
  • 4

Week-agenda (W49): Monday 06 December 2021 Tuesday 07 December 2021 Wednesday 08 December 2021

Heading

  • 1
  • 2
  • 3
  • 4

Heading

Heading

1 2

** TODO HEADING

HEADING

HEADING

HEADING

HEADING

HEADING

HEADING

HEADING

HEADING

HEAD

header 1

  • [ ] list el 1
  • [ ] list el 2
  • [ ] list el 3
  • [ ] list el 4

header 2

HEAD

header 1

  • [ ] list el 1
  • [ ] list el 2
  • [ ] list el 3
  • [ ] list el 4

header 2

@petRUShka
petRUShka / bibtex-to-latex-bibitem.sh
Last active August 26, 2018 09:28
Script that converts biblatex (bibtex) styled latex document bibliography to standard bibitem bibliography (thebibliography)
#!/bin/bash
###############################################################
# #
# BibTeX (BibLaTeX) to LaTeX \bibitem converter #
# #
###############################################################
# #
# This script converts a file containing #
# BibTeX (BibLaTeX) entries to a list of \bibitems, #
@petRUShka
petRUShka / get_certs.sh
Created January 25, 2017 17:48
get certificates
#!/bin/sh
SERVER=${1:-my.server.com}
PORT=${2:-993}
CERT_FOLDER=${3:-~/certs}
openssl s_client -connect ${SERVER}:${PORT} -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'| sed -ne '1,/-END CERTIFICATE-/p' > ${CERT_FOLDER}/${SERVER}.pem
@petRUShka
petRUShka / pre-commit
Last active September 22, 2016 12:43
Git hook which is prevent you from commit code with breakpoints or focus
#!/bin/sh
# Should be placed in .git/hooks/pre-commit inside project dir
# Do not forget to install The Silver Search: https://github.com/ggreer/the_silver_searcher#linux
ag_output=$(ag --color "(:focus\b)|(^[^#\\n]+(byebug|binding\.pry))" `git diff-index --cached HEAD --no-commit-id --name-only | grep ".*rb$"` 2> /dev/null)
if [ $? == 0 ]
then
echo "There are undeleted :focus or breakpoint (byebug or pry-byebug) in following files:"
echo "$ag_output"
exit 1
@petRUShka
petRUShka / be_observed_by.rb
Last active August 29, 2015 14:06
be_observed_by matcher
require 'rspec/expectations'
RSpec::Matchers.define :be_observed_by do |observer_name|
match do |obj|
ActiveRecord::Base.observers.enable observer_name
observer = observer_class(observer_name)
# save old after_create and define new
was_defined = observer.method_defined?(:after_create)