Create 90-refresh-packagekit.hook
file in /etc/pacman.d/hooks/
with the following contents
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = *
[Action]
#include "scheduler.h" | |
#include <QDBusConnection> | |
#include <QDBusMessage> | |
#include <QDBusVariant> | |
#include <mutex> | |
#include <sched.h> | |
#include <sys/resource.h> |
Create 90-refresh-packagekit.hook
file in /etc/pacman.d/hooks/
with the following contents
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = *
[Action]
#!/usr/bin/env python3 | |
# Copyright (C) 2020 Vlad Zahorodnii | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
[Unit] | |
Description=Synergy Server Daemon | |
After=network.target | |
[Service] | |
User=%i | |
ExecStart=/usr/bin/synergys --no-daemon --config /etc/synergy.conf --enable-crypto | |
Restart=on-failure | |
[Install] |
[Desktop Entry] | |
Version=1.0 | |
Name=Firefox Nightly | |
GenericName=Web Browser | |
Comment=Browse the Web | |
Exec=/home/vlad/Applications/firefox-nightly/firefox --name firefox-nightly -P Nightly %u | |
Icon=/home/vlad/Applications/firefox-nightly/browser/chrome/icons/default/default128.png | |
Terminal=false | |
Type=Application | |
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; |
find . -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \ | |
| xargs clang-format -style=file -i -fallback-style=none |
#include <iostream> | |
using std::cout; | |
using std::endl; | |
template <int N> | |
struct factorial { | |
constexpr static int value = N * factorial<N-1>::value; |
import numpy as np | |
def eval_gradient_naive(f, x, dx=1e-4): | |
grad = np.zeros_like(x) | |
it = np.nditer(x, flags=['multi_index'], op_flags=['readwrite']) | |
while not it.finished: | |
ix = it.multi_index |
NORMAL: | |
- dd : cut line | |
- 10dd : cut 10 lines | |
- daw : cut word | |
- d2w : cut two words | |
- %d : cut all content | |
- y : copy | |
- yy : yank line | |
- 10yy : copy 10 lines | |
- p : paste after cursor |
function torch_activate() | |
set -gx TORCH_INSTALL_DIR $HOME | |
set -gx LUA_PATH $TORCH_INSTALL_DIR'/.luarocks/share/lua/5.1/?.lua;'$TORCH_INSTALL_DIR'/.luarocks/share/lua/5.1/?/init.lua;'$TORCH_INSTALL_DIR'/torch/install/share/lua/5.1/?.lua;'$TORCH_INSTALL_DIR'/torch/install/share/lua/5.1/?/init.lua;./?.lua;'$TORCH_INSTALL_DIR'/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua' | |
set -gx LUA_CPATH $TORCH_INSTALL_DIR'/.luarocks/lib/lua/5.1/?.so;'$TORCH_INSTALL_DIR'/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so' | |
set -gx LD_LIBRARY_PATH $TORCH_INSTALL_DIR/torch/install/lib $LD_LIBRARY_PATH | |
set -gx DYLD_LIBRARY_PATH $TORCH_INSTALL_DIR/torch/install/lib $DYLD_LIBRARY_PATH | |
set -gx LUA_CPATH $TORCH_INSTALL_DIR'/torch/install/lib/?.so;' $LUA_CPATH | |
set -gx fish_user_paths $TORCH_INSTALL_DIR/torch/install/bin $fish_user_paths | |
end |