LogExpert
https://github.com/zarunbal/LogExpert
(?<date>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{4})\|(?<level>.*)\|(?<class>.*)\|(?<message>.*)
# Removes the speech bubble with letters incl. accents etc. | |
# Great addon for this modificatiton | |
defaults write -g ApplePressAndHoldEnabled -bool false | |
# normal minimum is 15 (225 ms) | |
defaults write -g InitialKeyRepeat -int 20 | |
# normal minimum is 2 (30 ms) | |
defaults write -g KeyRepeat -int 2 |
#!/usr/bin/env python | |
# saved to ~/bin/batcharge.py and from | |
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
#!/usr/bin/env python | |
# coding=UTF-8 | |
import math, subprocess | |
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
output = p.communicate()[0] |
(?<IP>[^ ]*) \- \- \[(?<Datetime>[^\]]+)\] \"(?<Verb>[^\ ]+)\ (?<Path>.*) (?<HTTP>HTTP/\d\.\d)" |
LogExpert
https://github.com/zarunbal/LogExpert
(?<date>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{4})\|(?<level>.*)\|(?<class>.*)\|(?<message>.*)
# Usage intendended for WSL. Add following row to your .zshrc, .bashrc, or what shell you are using. | |
# Try which variant suites your terminal best! :) | |
# Author: Patrik Höggren <p@hoggren.nu> | |
# | |
# Type 1: | |
LS_COLORS="rs=0:di=34:ln=35:mh=00:pi=35:so=32:do=34:bd=1;36:cd=1;37:or=40;31;01:mi=00:su=1,37:sg=30;1:ca=30;41:tw=30:ow=34:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# To scope this to your account, copy-paste the content below | |
# to `%USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1`. | |
# Create the file if it doesn't exists. | |
#PSReadline | |
# Remove the annoying warning/error sound and enable Emacs mode, it changes `Tab` completion behaviour, and much more: | |
# <https://docs.microsoft.com/en-us/powershell/module/psreadline/about/about_psreadline?view=powershell-6> | |
Set-PSReadLineOption -EditMode Emacs -BellStyle None |
# Boxstarter Configuration | |
# Updated 2020-01-28 | |
# https://boxstarter.org/ | |
# https://chocolatey.org/ | |
# Install BoxStarter: | |
# `. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force` | |
Set-WindowsExplorerOptions ` | |
-EnableShowRibbon ` | |
-EnableShowFileExtensions ` |
#!/bin/bash | |
# Usage: ./bootable_usb4mac.sh /dev/rdiskX isofile.iso | |
# Writing to /dev/rdiskX requires root privilegies, and rdisk is FASTER | |
# https://superuser.com/questions/631592/why-is-dev-rdisk-about-20-times-faster-than-dev-disk-in-mac-os-x/631601 | |
USBDISK=$1 | |
ISOFILE=$2 | |
TMPFILE="tempoutput" | |
if [ "$(whoami)" != "root" ]; then | |
echo "no root, qutting" |