Skip to content

Instantly share code, notes, and snippets.

View vladak's full-sized avatar

Vladimir Kotal vladak

  • Europe
View GitHub Profile
@vladak
vladak / ips-mediator-hell.md
Last active August 24, 2021 08:01
IPS mediators - mixing version and implementation

Question: is mixing mediator-version with mediator-implementation in Solaris IPS a good idea ?

TLDR answer: no, generally it's not

Case 1

Suppose we have 2 packages that mediate usr/include/moomin (also they deliver symlinks in lib which is not really mediated since the link names differ), the foo package mediates using the mediator-version, the bar package mediates using mediator-implementation:

uls-0:/builds/vkotal/ips$ grep -v ^# foo.p5m 
set name=pkg.fmri [email protected],5.11-0
@vladak
vladak / projektor.md
Last active October 2, 2019 12:38
projektor MS
xrandr --addmode DP-2 1440x900

What is OpenGrok

  • blindingly fast source code search and cross-reference engine
    • can be used for searching and source code browsing
    • “grok” = profoundly understand
      • in our case, source code
  • the IP/project is still owned by Oracle
    • developed as open source (CDDL license)
  • Searching computer programs that use different semantics
  • written in Java/JSP
  • originally developed as a tool perform security vulnerability research quickly
@vladak
vladak / ubuntu-notes.md
Last active November 16, 2025 20:17
Ubuntu notes

Service management

  • temporary: sudo service stop mydesktop
  • permanent: sudo systemctl disable mydesktop

DNS servers debugging

  • get local DNS server address: cat /etc/resolv.conf
  • get list of DNS servers: netplan get all
  • show who is listening on port 53 netstat -peanut (without lsof)
- mysh: go through detailed task description
- can start coding right away (parsing), do not have to wait until fork()/pipe()/exec() are explained
- the shell cannot (and should not) be coded in couple of days
- write your own unit tests
- demonstrate how to use Github+Travis
.travis.yml:
language: c
compiler:
- clang
- notable features/changes in 1.1:
- RESTful API
- Python scripts
- indexer parallelization
- Suggester (Adam Hornacek's master thesis)
- new highlighter
- LOC column
- no packages anymore
- Search CLI EOF
- project centric approach
foo
+--------+
| |
+--------+
tasks:
- rewrite queue-simulation.c to use RW locks
- add another thread that will print the number of items
in the queue less frequently than the main thread
- run atomic-add in multiple modes, compare the results
- write pthread_barrier impl
- start with phtread_barrier_t, pthread_barrier_wait()
- rewrite semaphores/posix-sem-fixed-race.c to use unnamed
semaphores. Are they kernel persistent ?
- signals and threads (*go through the slide first*):
- create process with N threads
- see if sending a signal to the whole process with multiple threads will deliver the signal to
different threads (perform various activities in the threads - I/O, CPU intensive, mix of both, ...)
- define a foo_t type as structure with a reference count and implement 2 macros:
FOO_REHOLD - bumps the refcount
FOO_REFRELE - decrement the refcount and if 0, call foo_free()
that will de-initialize the data structure
- implement negative unit test