"8=FOO.4.2\u00019=73\u000135=XyZ\u000149=BRKR\u000156=INVMGR\u000134=235\u000152=19980604-07:58:28\u0001112=19980604-07:58:28\u000110=235\u0001"
8=FOO.4.2
9=73
35=XyZ
| # Write a quick note and instantly stash it to a place where all your quick | |
| # thoughts can be stored to sort them out later. | |
| # Can be added to your .bashrc / .zshrc / etc. | |
| function stash_note { | |
| echo $(date; cat ~/note) >> ~/notes && cat /dev/null > ~/note | |
| } | |
| alias notes='vim ~/notes' | |
| alias note='vim ~/note && stash_note' |
| ### Keybase proof | |
| I hereby claim: | |
| * I am ston1x on github. | |
| * I am stoniques (https://keybase.io/stoniques) on keybase. | |
| * I have a public key ASCkQIcKDEN_9SgAf6x3PdVC6fuLcNEvrj5mIdGDZ6qIGwo | |
| To claim this, I am signing this object: |
| #!/bin/bash | |
| function kill_unicorn() { | |
| kill $(ps aux | grep "unicorn master" | grep -v "grep" | awk '{print $2}' | tail -1) | |
| } |
| #!/usr/bin/env ruby -w | |
| ## Using ruby's standard OptionParser to get subcommand's in command line arguments | |
| ## Note you cannot do: opt.rb help command | |
| ## other options are commander, main, GLI, trollop... | |
| # run it as | |
| # ruby opt.rb --help | |
| # ruby opt.rb foo --help | |
| # ruby opt.rb foo -q | |
| # etc |
At the 2004 Ruby Conference, Jamis Buck had the unenviable task to explain Dependency Injection to a bunch of Ruby developers. First of all, Dependency Injection (DI) and Inversion of Control (IoC) is hard to explain, the benefits are subtle and the dynamic nature of Ruby make those benefits even more marginal. Furthermore examples using DI/IoC are either too simple (and don’t convey the usefulness) or too complex (and difficult to explain in the space of an article or presentation). I once attempted to explain DI/IoC to a room of Java programmers (see onestepback.org/articles/dependencyinjection/), so I can’t pass up trying to explain it to Ruby developers.
Thanks goes to Jamis Buck (the author of the Copland DI/IoC framework) who took the time to review this article and provide feedback.
| // Took from https://github.com/fivemru/export-vk-playlist-to-file | |
| (async () => { | |
| const scroll = (top) => window.scrollTo({ top }); | |
| const delay = (ms) => new Promise((r) => setTimeout(r, ms)); | |
| async function loadFullPlaylist() { | |
| const spinner = document.querySelector('.CatalogBlock__autoListLoader'); | |
| let pageHeight = 0; | |
| do { | |
| pageHeight = document.body.clientHeight; |