Skip to content

Instantly share code, notes, and snippets.

View AdrianVovk's full-sized avatar

Adrian Vovk AdrianVovk

  • carbonOS - https://carbon.sh
  • Cleveland, Ohio, United States
View GitHub Profile
TODO:
- Test updatectl --reboot on a real system
- App stream bundle kind: systemd (see below)
- gnome-software plugin
- Make it possible for importd to download more types of things (see below)
- Add Switch() command to each target (see below)
- (Somehow) get download size information and pipe it through the whole chain
- Somewhat smarter error handling
- More specific errors ("specified version is obsolete" or "specified version is not available", rather than "invalid argument")
@AdrianVovk
AdrianVovk / live.js
Last active November 16, 2019 18:59
Getting around my school's web filter
!function(){var r={Etag:1,"Last-Modified":1,"Content-Length":1,"Content-Type":1},p={},c={},f={},i={},v=!1,g={html:1,css:1,js:1},w={heartbeat:function(){document.body&&(v||w.loadresources(),w.checkForChanges()),setTimeout(w.heartbeat,1e3)},loadresources:function(){function e(e){var t=document.location,o=new RegExp("^\\.|^/(?!/)|^[\\w]((?!://).)*$|"+t.protocol+"//"+t.host);return e.match(o)}for(var t=document.getElementsByTagName("script"),o=document.getElementsByTagName("link"),a=[],n=0;n<t.length;n++){var s=t[n].getAttribute("src");if(s&&e(s)&&a.push(s),s&&s.match(/\blive.js#/)){for(var r in g)g[r]=null!=s.match("[#,|]"+r);s.match("notify")&&alert("Live.js is loaded.")}}g.js||(a=[]),g.html&&a.push(document.location.href);for(n=0;n<o.length&&g.css;n++){var c=o[n],i=c.getAttribute("rel"),l=c.getAttribute("href",2);l&&i&&i.match(new RegExp("stylesheet","i"))&&e(l)&&(a.push(l),f[l]=c)}for(n=0;n<a.length;n++){var d=a[n];w.getHead(d,function(e,t){p[e]=t})}var u=document.getElementsByTagName("head")[0],h=document.cr
@AdrianVovk
AdrianVovk / keybase.md
Created September 9, 2018 16:49
This verifies my identity

Keybase proof

I hereby claim:

  • I am AdrianVovk on github.
  • I am adrianvovk (https://keybase.io/adrianvovk) on keybase.
  • I have a public key whose fingerprint is DE7E 2566 8C8D 3A48 7213 CCF6 DC3C BEB7 1741 ADE4

To claim this, I am signing this object:

#!/usr/bin/env bash
function count_posts () {
curl 206.189.179.133 -c cookies.txt -X POST -F password="%\" UNION SELECT COUNT(*),COUNT(*),COUNT(*) FROM posts WHERE author=\"$1\" -- a" -F btnSubmit=1 -s > /dev/null
wget --load-cookies=cookies.txt 206.189.179.133/user -q -O - | grep title | grep -oP '\<title\>\d+' | grep -oP '\d+'
rm cookies.txt
}
if [ ! -f botposts ]; then
echo GENERATING POST CACHE
for BOT in `cat botlist`; do
$ cpkg install node
node is not a known package, but it is a command in nodejs.
Would you like to install nodejs? [y/N]: y
Installing nodejs...
[=================================================================================================] 100%
Installation successful.
$ sudo cpkg repo change unstable
Would you like to change the repo system-wide? This can potentially lead to a system upgrade/downgrade. [y/N]: y
Adding repo https://nixos.org/channels/nixos-unstable...
@AdrianVovk
AdrianVovk / LibInput.log
Last active April 25, 2018 01:13
Wayfire Crashes.
[src/debug-func.hpp:72] crash detected!
2018-04-24 20:04:17 - [src/debug-func.hpp:18] stack trace
2018-04-24 20:04:17 - [src/debug-func.hpp:56] wlwayfire/result/bin/wayfire:signalHandle(int)+0x30
2018-04-24 20:04:17 - [src/debug-func.hpp:58] /nix/store/84h2zni7h805k0i1ys2bba3dsp1cqnhh-glibc-2.26-131/lib/libc.so.6:+0x342d0
2018-04-24 20:04:17 - [src/debug-func.hpp:58] /nix/store/84h2zni7h805k0i1ys2bba3dsp1cqnhh-glibc-2.26-131/lib/libc.so.6:__read+0x11
2018-04-24 20:04:17 - [src/debug-func.hpp:58] /nix/store/g7ps47mkzgccf89nd6plhcs5xn6fm93r-libevdev-1.5.8/lib/libevdev.so.2:+0xb54c
2018-04-24 20:04:17 - [src/debug-func.hpp:58] /nix/store/g7ps47mkzgccf89nd6plhcs5xn6fm93r-libevdev-1.5.8/lib/libevdev.so.2:libevdev_next_event+0x408
2018-04-24 20:04:17 - [src/debug-func.hpp:58] /nix/store/icx9zav33wjgzmpd6g77za3hyhw91pdc-libinput-1.10.0/lib/libinput.so.10:+0x100c3
2018-04-24 20:04:17 - [src/debug-func.hpp:58] /nix/store/icx9zav33wjgzmpd6g77za3hyhw91pdc-libinput-1.10.0/lib/libinput.so.10:libinput_dispatch+0x5f
2018-04
@AdrianVovk
AdrianVovk / fix-surface
Created January 20, 2017 05:03
Bash script to fix the surface touchpad issues
#!/bin/bash
case $1 in
"start")
$0 thread &
;;
"stop")
kill `cat /tmp/fixpid`
;;
"thread")
echo $BASHPID > /tmp/fixpid