Listing posts
Displaying posts 146 - 150 of 328 in total
patchelf | modifying ELF executables and libraries
Last update
2020-05-02
2020-05-02
«modify linux executable interpreter, library path, requirements»
1 2 3 4 5 6 | apt install patchelf patchelf \ --set-interpreter /lib/ld-linux-x86-64.so.2 \ --set-rpath /opt/app/mylibs \ ./elf-name |
Source: github
~~~ * ~~~
~~~ * ~~~
DLNA interactions/tools
ruby
Last update
2020-04-26
2020-04-26
« — »
ref
- google
dlna browse method objectid
- https://developer.sony.com/develop/audio-control-api/get-started/browse-dlna-file
tools
- go: https://github.com/vishen/go-chromecast
- ruby: https://github.com/sidoh/easy_upnp
- c++: https://wiki.gnome.org/Projects/GUPnP
- python: https://pypi.org/project/PyChromecast
- gui/python: https://github.com/muammar/mkchromecast
ruby easy_upnp
gem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | require 'easy_upnp' searcher = EasyUpnp::SsdpSearcher.new devices = searcher.search 'ssdp:all' device = devices.first device.all_services device.description # client service = device.service 'urn:schemas-upnp-org:service:ContentDirectory:1', validate_arguments: true service.service_methods service.GetSystemUpdateID service.method_args :Browse ris = service.Browse ObjectID: '0', BrowseFlag: 'BrowseDirectChildren' ris2 = Nokogiri::XML.parse ris[:Result] ris2.css('container').map{|e| e['id'] } # client from static config service2 = EasyUpnp::DeviceControlPoint.from_params service.to_params service.GetSystemUpdateID |
~~~ * ~~~
Ruby daemon
Last update
2020-04-13
2020-04-13
« — »
1 2 3 4 5 6 7 8 9 10 11 12 13 | if RUBY_VERSION >= "1.9" Process.daemon else exit if fork # stop being a process group leader Process.setsid # become a process&session group leader exit if fork # now we can never regain a controlling terminal Dir.chdir "/" # ensure we don't keep any directory in use File.umask 0 # have complete control over our files (optional) # reopen standard descriptors to oblivion (or where we want) STDIN .reopen "/dev/null" STDOUT.reopen "/dev/null", "a" STDERR.reopen "/dev/null", "a" end |
Source: stackoverflow linux daemonize, jstorimer.com post, MRI Process.daemon, daemons gem
~~~ * ~~~
Salame al cioccolato senza uova
Last update
2020-04-13
2020-04-13
«alias tronchetto al cioccolato»
Ingredienti:
- 260gr cioccolato fondente
- 250gr biscotti secchi
- 150gr burro morbido
- 50gr zucchero
- 20ml grand marnier
Procedimento:
Sciogliere il cioccolato a fiamma bassa
Lavorare con una forchetta il burro ammorbidito insieme allo zucchero
Incorporare il grand marnier a filo ottenendo una crema
Incorporare il cioccolato tiepido
Frantumare ed incorporare i biscotti
Stendere su un foglio di carta da forno, farne una caramella e dare la forma di un salame
Mettere in frigo per almeno 2 ore
Fonte: giallozafferano.it