This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import md5, sha1 | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.backends import default_backend | |
from base64 import b64encode, b64decode | |
import sys, time | |
import requests | |
DEFAULT_MASTERKEY=b'p1a2l3o4a5l6t7o8' | |
class PanCrypt(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar sk-package-loading-notice-list '(org yasnippet)) | |
(defun sk-package-loading-notice (old &rest r) | |
(let* ((elt (car r)) | |
(mode | |
(when (stringp elt) | |
(let ((ret (assoc-default elt auto-mode-alist 'string-match))) | |
(and (symbolp ret) (symbol-name ret))))) | |
(pkg | |
(cond ((symbolp elt) elt) |
Place file into qemu root directory
Do cd path/to/qemu && ./name_of_file name_of_target
(i.e. x86_64-softmmu)
Library is at /path/to/qemu/x86_64-softmmu/libqemu.so
You might need to compile vl.c
and link with it in your final
binary, just do something like this:
#define main __definetly_not_main
#include "/path/to/qemu/vl.c"
#undef main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Inspired on https://david-kerwick.github.io/2017-01-04-combining-zsh-history-files/ | |
set -e | |
history1=$1 | |
history2=$2 | |
merged=$3 | |
echo "Merging history files: $history1 + $history2" | |
test ! -f $history1 && echo "File $history1 not found" && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, ... }: | |
let inherit (pkgs) stdenv qemu getopt; in | |
{ | |
systemd.additionalUpstreamSystemUnits = [ | |
"proc-sys-fs-binfmt_misc.automount" | |
"proc-sys-fs-binfmt_misc.mount" | |
]; | |
environment.etc."binfmt.d/qemu-user.conf".source = stdenv.mkDerivation { | |
name = "qemu-binfmt"; | |
inherit (qemu) src; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn make-profile-transform [^String thread-name] | |
(fn [^String s] | |
(when (> (.indexOf s thread-name) -1) | |
(-> s | |
(str/replace #"com.fasterxml.jackson.+" "JACKSON...") | |
(str/replace #"org.elasticsearch.client.RestClient.+" "ES request...") | |
(str/replace #"clojure.tools.logging/.+" "LOG..."))))) | |
(defn profiler-mw [handler] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* hex2bytes - hex string of unlimited length to a continous block of bytes | |
* Copyright (C) 2018 Bernhard Arnold <[email protected]> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ...}: | |
with lib; | |
let | |
cfg = config.services.batteryNotifier; | |
in { | |
options = { | |
services.batteryNotifier = { | |
enable = mkOption { |
NewerOlder