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
{ | |
"aururl": "https://aur.archlinux.org", | |
"aurrpcurl": "https://aur.archlinux.org/rpc?", | |
"buildDir": "/home/abraham/.cache/yay", | |
"editor": "", | |
"editorflags": "", | |
"makepkgbin": "makepkg", | |
"makepkgconf": "", | |
"pacmanbin": "pacman", | |
"pacmanconf": "/etc/pacman.conf", |
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
#/usr/bin/env bash | |
folder=${1:-$(pwd)} | |
ip_address=$(ip a | grep -E '[0-9]+: w[a-z0-9]+:' -A2 | grep 'inet ' | cut -d' ' -f6 | cut -d/ -f1) | |
port=${2:-$(( 8001 + RANDOM % (9000 - 8001 + 1) ))} | |
echo "Serving directory $folder on http://$ip_address:$port" | |
cd $folder | |
python -m http.server $port |
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
# Generated by Powerlevel10k configuration wizard on 2022-08-08 at 13:44 IDT. | |
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 15312. | |
# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, | |
# 12h time, slanted separators, sharp heads, sharp tails, 2 lines, solid, left frame, | |
# lightest-ornaments, sparse, many icons, concise, transient_prompt, | |
# instant_prompt=verbose. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with powerline prompt style with colorful background. | |
# Type `p10k configure` to generate your own config based on it. |
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
#!/usr/bin/env bash | |
""""\ | |
export LAUNCHED_WITH_BASH=true | |
echo this is bash | |
echo args: "$0" "$@" | |
python3.7 "$0" "$@" | |
exit $? | |
""" | |
import os |
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
#!/usr/bin/env bash | |
LINES=${LINES:-$(tput lines)} | |
if [[ -d "$1" || -z "$1" ]]; then | |
ls -lhF --color=always "${1:-$(pwd)}" | |
elif [[ $(head -n $LINES "$1" | wc -l) -eq $LINES ]]; then | |
less -N "$1" | |
else | |
cat "$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
from prompt_toolkit.filters import ViInsertMode | |
from prompt_toolkit.key_binding.key_processor import KeyPress | |
from prompt_toolkit.keys import Keys | |
from prompt_toolkit.styles import Style | |
from ptpython.layout import CompletionVisualisation | |
__all__ = ["configure"] | |
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 | |
all_devices=$(pacmd list-sinks | grep "index" | awk 'NF>1{print $NF}' | tr '\n' ' ') | |
current_device=$(pacmd list-sinks | grep "* index" | awk 'NF>1{print $NF}') | |
found=false | |
# set next_device to first device | |
next_device=$(echo $all_devices | cut -d " " -f1) | |
# set next_device to device after current_device (if it exists) |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="1"> | |
<profile kind="CodeFormatterProfile" name="Abraham" version="1"> | |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> |
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
disk_path=/home/abraham/vm/qemu/win/disk | |
webcam_bus=$(lsusb | grep -i cam | awk '{print $2}') | |
webcam_dev=$(lsusb | grep -i cam | awk '{print substr($4, 1, length($4)-1)}') | |
# change permissions for webcam | |
sudo chmod a+w /dev/bus/usb/$webcam_bus/$webcam_dev | |
# launch command | |
qemu-system-x86_64 -m 4096 -enable-kvm -drive file=$disk_path,format=raw -cpu host -smp cores=$(nproc) -vga virtio -device sb16 -device ES1370 -device AC97 -device adlib -device gus -device cs4231a -device intel-hda -device hda-duplex -usb -device usb-ehci,id=ehci -device usb-host,hostbus=$webcam_bus,hostaddr=$webcam_dev |
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
if(typeof jQuery=='undefined') { | |
var headTag = document.getElementsByTagName("head")[0]; | |
var jqTag = document.createElement('script'); | |
jqTag.type = 'text/javascript'; | |
jqTag.src = '//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'; | |
jqTag.onload = execute; | |
headTag.appendChild(jqTag); | |
} else { | |
execute() | |
} |
NewerOlder