| import sys | |
| from PySide2.QtWidgets import (QApplication, QDialog, QPushButton, QLabel, QHBoxLayout) | |
| from PySide2.QtCore import Qt | |
| from binaryninjaui import (UIAction, UIActionHandler, Menu) | |
| class GreatUI(QDialog): | |
| def __init__(self, parent=None): | |
| super(GreatUI, self).__init__(parent) | |
| self.setWindowModality(Qt.NonModal) |
| # Requires `inxi` package to be installed | |
| function fish_right_prompt -d "Write out the right prompt" | |
| # Get battery percentage and status | |
| set level (inxi --battery | python -c "import sys, re; input = sys.stdin.read(); line = input.split()[6]; print(re.sub('[()]', '', line))") | |
| set battery_status (upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "state:" | awk '{ print $2 }') | |
| # Define colors | |
| # Normal colors |
| for f in /usr/share/figlet/* | |
| do | |
| fs=$(basename $f) | |
| fname=${fs%%.tlf} | |
| toilet -f $fname $fname | |
| done |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes.
By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.
| import re, subprocess, idaapi, ida_segment, ida_kernwin | |
| # To install this, simply put it in your ida_install/loaders folder and open | |
| # a `/proc/<pid>/mem` file! | |
| # | |
| # You might need to set `echo 0 > /proc/sys/kernel/yama/ptrace_scope` if you | |
| # want to be able to dump processes depending on your system configuration. | |
| # Check if the file is supported by our loader | |
| def accept_file(li, filename): |
| # UPDATED 17 February 2019 | |
| # Redirect all HTTP traffic to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name www.domain.com domain.com; | |
| return 301 https://$host$request_uri; | |
| } | |
| # SSL configuration |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux