Skip to content

Instantly share code, notes, and snippets.

@osv
osv / nix-search.sh
Created March 14, 2023 17:41 — forked from aakropotkin/nix-search.sh
FZF Fuzzy search for NixOS Options and Packages
#! /usr/bin/env bash
# Provided a list of package and option names (provided by my `writeOpts.sh` and
# `writePacks.sh` scripts), fuzzy search package and options information.
# The selection's definition will be opened in vim (as readonly) for viewing.
# NOTE: This script opens the result in a new URxvt window, you most likely will want
# to change that to open in the current window, or your own Terminal Emulator of
# choice. The current implementation is intended for use with a temporary XMonad
# scratchpad, which dies immediately after exiting (thus a new URxvt window is
# required).
git clone https://bitbucket.org/bzz/nixos.git bzz
git clone https://github.com/setser/nixos-config.git setser
git clone https://github.com/Lord-Valen/configuration.nix.git Lord-Valen
git clone https://github.com/jakehamilton/config.git jakehamilton
git clone https://github.com/kanashimia/nixos-config.git kanashimia
git clone https://github.com/Baitinq/nixos-config.git Baitinq
git clone https://github.com/balsoft/nixos-config.git balsoft
git clone https://github.com/Weathercold/nixfiles.git Weathercold
git clone https://git.sr.ht/~rycee/configurations rycee
git clone https://github.com/kenranunderscore/dotfiles.git kenranunderscore
@osv
osv / configuration.nix
Created February 20, 2023 10:55 — forked from kodeFant/configuration.nix
My NixOs configuration with xMonad working
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix

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.

@osv
osv / gist:3deb93a38601aa8c35a1b34a4a95a6af
Created August 8, 2022 10:43 — forked from tthtlc/gist:f44148a7cb4d820bf2d3da64638de68c
Forensic analysis techniques: linux
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 June 29, 2022 21:27
pulse audio compressor module linux
.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
<?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 October 21, 2021 14:50
vast 3 example #2
<?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 October 16, 2021 12:13
html -> canvast -> tesseract example
// 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')