Skip to content

Instantly share code, notes, and snippets.

View vladshablinsky's full-sized avatar

Uladzislau Shablinski vladshablinsky

View GitHub Profile
@vladshablinsky
vladshablinsky / fail.log
Created February 25, 2017 19:15
brew tests fails
➜ vlad:Homebrew$ brew tests master
4 processes for 298 tests, ~ 74 tests per process
/usr/local/Homebrew/Library/Homebrew/test/vendor/bundle/ruby/2.0.0/bundler/gems/simplecov-83d8031ddde0/spec/faked_project/test/meta_magic_test.rb:1:in `require': cannot load such file -- test_helper (LoadError)
from /usr/local/Homebrew/Library/Homebrew/test/vendor/bundle/ruby/2.0.0/bundler/gems/simplecov-83d8031ddde0/spec/faked_project/test/meta_magic_test.rb:1:in `<top (required)>'
from -e:1:in `require'
from -e:1:in `block in <main>'
from -e:1:in `each'
from -e:1:in `<main>'
/usr/local/Homebrew/Library/Homebrew/test/vendor/bundle/ruby/2.0.0/bundler/gems/simplecov-83d8031ddde0/spec/faked_project/test/faked_test.rb:1:in `require': cannot load such file -- test_helper (LoadError)
from /usr/local/Homebrew/Library/Homebrew/test/
@vladshablinsky
vladshablinsky / vpn.md
Created January 25, 2017 13:03 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

Why not?

Because a VPN in this sense is just a glorified proxy. The VPN provider can see all your traffic, and do with it what they want - including logging.

@vladshablinsky
vladshablinsky / linux.sh
Created January 10, 2017 09:53 — forked from marcan/linux.sh
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@vladshablinsky
vladshablinsky / keybase.md
Last active September 7, 2016 19:28
keybase.md

Keybase proof

I hereby claim:

  • I am vladshablinsky on github.
  • I am vladshablinsky (https://keybase.io/vladshablinsky) on keybase.
  • I have a public key whose fingerprint is 3B85 C0FA 531A 1746 5A9F D834 9C5A 4174 BBC3 BE3E

To claim this, I am signing this object:

@vladshablinsky
vladshablinsky / libofwat
Created May 21, 2016 19:26
head using :cvs fails
➜ vlad:Homebrew$ brew install libowfat --HEAD --verbose master
==> Cloning :pserver:cvs:@cvs.fefe.de:/cvs
Updating /Library/Caches/Homebrew/libowfat--cvs
/usr/local/bin/cvs up
/cvs-bin update: Updating .
/cvs-bin update: Updating array
/cvs-bin update: Updating buffer
/cvs-bin update: Updating byte
/cvs-bin update: Updating case
/cvs-bin update: Updating cdb
Project Title Student Display Name Organization Name Mentors
Key mapping GUI Tomasito665 Mixxx DJ Software RJ Ryan, Ferran Pujol Camins
YAPDNS system64 The Honeynet Project Pietro Delsante, Fedele Mantuano, Andrea De Pasquale
FFv1 P frame support sdolganov FFmpeg Reynaldo Verdejo, michaelni
coala: Integrating coala with the Eclipse IDE Sheikh Araf Python Software Foundation Harsh Dattani, Lasse Schuirmann (sils1297), AbdealiJKothari
User interfaces for Tracker Dilushi Sustainable Computing Research Group ( SCoRe ) Dinith Minura, Namal Jayasuriya, Rumesh
File Support izgzhen Mozilla Manishearth
KolibriOS. Development of TLS/SSL library DenisKarpenko KolibriOS Jeffrey A., Pathoswithin
IPFS friendly & distributed version of Amber skbly7 Berkman Center for Internet and Society Genève
Cache layer for jpf-nhandler Jayton Java Pathfinder Team franck, Nastaran, Cyrille Artho

Concept

(The blockquote style does not look so well so I just pasted directly, but these are all quoted from the links in the bottom of this page)

You should not implement to_str unless your object acts like a string, rather than just having a string representation. The only core class that implements to_str is String itself.

[to_i and to_s] are not particularly strict: if an object has some kind of decent representation as a string, for example, it will probably have a to_s method… [to_int and to_str] are strict conversion functions: you implement them only if you object can naturally be used every place a string or an integer could be used.

to_str is used by methods such as String#concat to convert their arguments to a string. Unlike to_s, which is supported by almost all classes, to_str is normally implemented only by those classes that act like strings. Of the built-in classes, only Exception and String implement to_str

Mar-18 02:37:50 <1> : kiwi --build /home/vlad/Projects/git/machinery/spec/definitions/boxes/definitions/base_opensuse13.2_kvm --destdir /tmp/pennyworth-builds --logfile /tmp/pennyworth-builds/kiwi-terminal-output.log
Mar-18 02:37:50 <1> : kiwi revision: abefa16730fcf356afb2b45b71d93d13dae02780
Mar-18 02:37:50 <1> : Setting log file to: /tmp/pennyworth-builds/kiwi-terminal-output.log
Mar-18 02:37:50 <1> : EXEC [/usr/bin/uname -m]
Mar-18 02:37:50 <1> : EXEC [/usr/bin/uname -m]
Mar-18 02:37:50 <1> : Description provides no MD5 hash, check
Mar-18 02:37:50 <1> : Reading image description [Prepare]...
Mar-18 02:37:50 <1> : EXEC [/usr/bin/uname -m]
Mar-18 02:37:50 <1> : EXEC [rm -f /var/cache/kiwi/zypper/repos/* 2>&1]
Mar-18 02:37:50 <1> : Setting up package manager:
@vladshablinsky
vladshablinsky / bundle_help.md
Last active March 8, 2016 15:54
bundle_help_test_fail

➜ vlad:bundler$ sw_vers                                                                                                                master
ProductName:	Mac OS X
ProductVersion:	10.10.5
BuildVersion:	14F27
➜ vlad:bundler$ ruby -v                                                                                                                master
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]
➜ vlad:bundler$ rvm -v                                                                                                                 master