This file contains hidden or 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
| fix_wsl2_interop() { | |
| for i in $(pstree -np -s $$ | grep -o -E '[0-9]+'); do | |
| if [[ -e "/run/WSL/${i}_interop" ]]; then | |
| export WSL_INTEROP=/run/WSL/${i}_interop | |
| fi | |
| done | |
| } | |
| alias socketfix='fix_wsl2_interop' | |
| export -f fix_wsl2_interop |
This file contains hidden or 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
| import errno | |
| import logging | |
| import os | |
| import re | |
| import subprocess | |
| import time | |
| from datetime import datetime | |
| from pathlib import Path | |
| from typing import List |
This file contains hidden or 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
| echo=off | |
| if [ "$1" = "--s8" ]; then | |
| mosquitto_pub -h $awsip -p $awsport -t vars/S8_boot_patch -r -m 1 | |
| device=9888d9303354564442 | |
| else | |
| mosquitto_pub -h $awsip -p $awsport -t vars/S10_boot_patch -r -m 1 | |
| device=RF8N82MR1VA | |
| fi | |
| echo Overriding security protocols for $device |
This file contains hidden or 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
| # wget https://gist.github.com/auwsom/fbeb8bfd36af91bb482529ee499f1058/raw -O bashsetup_docker ; bash !$ | |
| set +o history && sleep 1 | |
| sed -i /^'alias d'/d ~/.bashrc; sed -i /^'function d'/d ~/.bashrc ## remove old | |
| source ~/.bashrc ; exec bash ## have to restart shell to enter the bindings without recursion | |
| #echo "HISTIGNORE=''" >>~/.bashrc | |
| # sudo cp /usr/share/zoneinfo/US/Pacific /etc/localtime # cant set, read only | |
| echo "alias d='docker'">>~/.bashrc | |
| echo "alias dcm='docker commit'">>~/.bashrc # CONTAINER IMAGE_REPO:TAG <- have to specify or creates new image | |
| echo "alias del='docker exec -it \$(docker ps -q -l) bash'">>~/.bashrc | |
| echo "alias di='docker images'">>~/.bashrc |
This file contains hidden or 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
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
This file contains hidden or 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
| " ============================================================================= | |
| " Miller Medeiros .vimrc file | |
| " ----------------------------------------------------------------------------- | |
| " heavily inspired by: @factorylabs, @scrooloose, @nvie, @gf3, @bit-theory, ... | |
| " ============================================================================= | |
| " ----------------------------------------------------------------------------- | |
| " BEHAVIOR |
This file contains hidden or 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
| trigger: | |
| - master | |
| pool: | |
| vmImage: 'ubuntu-latest' | |
| variables: | |
| - group: kvintegratedvargroup | |
| steps: |
This file contains hidden or 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
| import PyPDF2, os, re, win32clipboard | |
| from gtts import gTTS | |
| win32clipboard.OpenClipboard() | |
| clip = win32clipboard.GetClipboardData() | |
| # clip = os.environ.get('USERPROFILE') +"\\Desktop\\Sorting\\digitilt-datamate-2003.pdf" | |
| win32clipboard.CloseClipboard() | |
| file_path = clip | |
| if(os.path.exists(file_path)): |
This file contains hidden or 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
| set gitstore=%userprofile%/SetupRepos/ | |
| echo Storage Directory set to: %gitstore% | |
| echo Moving Git repository to storage and creating reroute file | |
| attrib -H .git | |
| attrib -r .git | |
| for %%I in (.) do set x=%%~nxI | |
| move .git "%gitstore%%x%" | |
| copy /y NUL .git | |
| @echo gitdir: %gitstore%%x%>.git | |
| attrib +h .git |
This file contains hidden or 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
| @for %%I in (.) do @set x=%%~nxI | |
| @echo gitdir: %gitstore%%x%>.git | |
| @cat .git |