Skip to content

Instantly share code, notes, and snippets.

View donat-b's full-sized avatar

Donat donat-b

  • Planet Earth, The Solar System
View GitHub Profile
#!/usr/bin/env zsh
# batch convert video
setopt ERR_EXIT NO_UNSET
function main() {
typeset -r vcodec='libx265'
typeset -r acodec='libvorbis'
typeset -ri crf=24
typeset -ri fps=25
typeset -ri vs_zoom=20
root@hostname:/tmp# mkdir root1
root@hostname:/tmp# mkdir root2
root@hostname:/tmp# mkdir root1/a
root@hostname:/tmp# mkdir root2/a
root@hostname:/tmp# touch root1/a/o
root@hostname:/tmp# touch root1/a/e
root@hostname:/tmp# touch root2/a/u
root@hostname:/tmp# touch root2/a/i
root@hostname:/tmp# restic backup root1/a root2/a
scan [/tmp/root1/a /tmp/root2/a]
#!/usr/bin/env ruby
# Generates list of dates according to a format passed as an argument
# Example: date-listgen.rb '%Y-%m-%d'
# 2015-02-01
require 'date'
def list_dates(format)
if format.nil?
format = '%d%m%Y'
#!/usr/bin/env ruby
require 'csv'
@prefix = '8'
CSV.foreach('DEF.csv', { :col_sep => ';' }) do |row|
_code, _start, _end, _cound = row
for i in _start.._end
puts @prefix + _code + i
end

Keybase proof

I hereby claim:

  • I am donat-b on github.
  • I am donat_b (https://keybase.io/donat_b) on keybase.
  • I have a public key whose fingerprint is C8B2 1EDF 9377 42AC 1508 AE42 E157 FFCB 92DD C401

To claim this, I am signing this object: