Skip to content

Instantly share code, notes, and snippets.

Avatar

Olexandr Sydorchuk osv

View GitHub Profile
View nixos-zfs.org

NixOS Root on ZFS (single disk). No swap.

Disable Secure Boot. ZFS modules can not be loaded if Secure Boot is enabled.

Download NixOS Live Image and boot from it.

Connect to the Internet.

Set root password or /root/.ssh/authorized_keys.

View gist:3deb93a38601aa8c35a1b34a4a95a6af
http://darksoft.org/webbzr/docs/MyDocs/annotate/head:/Analysis/list.txt?sort=size
Toolset
=======
Tracers:
Function: perf, strace/ltrace
I/O: fatrace, lsof
Profilers:
Function/Tree: perf, valgrind/kcachegrind(slow), google-perftools (low precision)
@osv
osv / gist:a56db790dbbec46730033fd4e42749da
Created Jun 29, 2022
pulse audio compressor module linux
View gist:a56db790dbbec46730033fd4e42749da
.ifexists module-ladspa-sink.so
.nofail
load-module module-ladspa-sink sink_name=compressor-stereo plugin=sc4_1882 label=sc4 control=1,1.5,401,-30
set-default-sink compressor-stereo
.fail
.endif
View vast.v2.example.xml
<?xml version="1.0"?>
<VAST version="2.0">
<Ad>
<InLine>
<AdSystem>Some RTB</AdSystem>
<AdTitle>Some RTB</AdTitle>
<Description>Some RTB</Description>
<Creatives>
<Creative>
<Linear>
@osv
osv / mintu-vast3.xml
Created Oct 21, 2021
vast 3 example #2
View mintu-vast3.xml
<?xml version="1.0" encoding="UTF-8"?>
<VAST version="3.0">
<Ad id="50472620">
<InLine>
<AdSystem>KayzenRTB</AdSystem>
<AdTitle>KayzenRTB</AdTitle>
<Description>KayzenRTB</Description>
<Impression><![CDATA[https://impression.appsflyer.com/com.ripio.android?c=RIPIO_UA_AOS_AR_Video&af_siteid=com.avast.android.mobilesecurity&af_c_id=160607&af_ad_id=50347653&af_ad=Video_AR_AOS_320x480&af_channel=Unity&pid=dataliftretargeting_int&af_viewthrough_lookback=1d&clickid=496579951-1629702125-137-1-53-205-1-ty23k-7c7d12b1-3e10-48a1-a98d-6b3c143c0c00-9083-f6600-10044-160607-50431125&advertising_id=2f9432bd-a091-425a-95c1-168f220224b3]]></Impression>
<Impression><![CDATA[{IMP_URL}]]></Impression>
<Error><![CDATA[{VIDEO_ERROR_URL}]]></Error>
@osv
osv / scan_dom_table.ts
Created Oct 16, 2021
html -> canvast -> tesseract example
View scan_dom_table.ts
// Search table for, caprute rendered value and recognize using teseract. Pretty slow but works.
// https://habr.com/ru/news/t/578832/comments/#comment_23499710
// Run script in dev console for this website: http://www.izbirkom.ru/region/region/karachaev-cherkess?action=show&root=92000011&tvd=4094002721588&vrn=100100225883172&region=9&global=&sub_region=9&prver=0&pronetvd=null&vibid=4094002721588&type=242
(async ()=> {
const { default: capture } = await import( 'https://esm.sh/html2canvas' )
const { default: { recognize } } = await import( 'https://esm.sh/tesseract.js' )
const rows = document.querySelectorAll('.table-responsive tr')
View vast.v3.example.xml
<?xml version="1.0"?>
<VAST version="3.0">
<Ad>
<InLine>
<AdSystem>Example Ad system</AdSystem>
<AdTitle>Example title</AdTitle>
<Description>KayzenRTB</Description><Impression><![CDATA[http://imp.url]]></Impression>
<Creatives>
<Creative>
<Linear>
View test vast
<VAST version="2.0">
<Ad>
<Wrapper>
<VASTAdTagURI><![CDATA[ https://ad.doubleclick.net/ddm/pfadx/N624.2192503PERMODOGMBH/B24335141.275967726;sz=0x0;ord=[timestamp];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dcmt=text/xml;dc_sdk_apis=[APIFRAMEWORKS];dc_omid_p=[OMIDPARTNER] ]]></VASTAdTagURI>
</Wrapper>
</Ad>
</VAST>
View .xsessionrc
xscreensaver &
kbdd
sleep 10
setxkbmap -layout "us,ru(winkeys),ua(winkeys)" -option grp:menu_toggle,grp_led:scroll