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
| $WorkingDir = "$HOME/Documents/dfsr-logs" | |
| new-alias 7z "C:\Program Files\7-zip\7z.exe" | |
| cp C:/Windows/debug/Dfsr00999.log.gz $WorkingDir | |
| rm -recurse -force $WorkingDir/extracted | |
| 7z e $WorkingDir/Dfsr00999.log.gz "-o$WorkingDir\extracted" | |
| # gc $workingdir\extracted\Dfsr00999.log | sls "^[^+]" | |
| echo "Last 60 lines of DFSR log" | |
| gc $workingdir/extracted/Dfsr00999.log -tail 60 |
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 boto3 | |
| def depaginate(function, resource_key, **kwargs): | |
| # Will depaginate results made to an aws client | |
| response = function(**kwargs) | |
| results = response[resource_key] | |
| while (response.get("NextToken", None) is not None): | |
| response = function(NextToken=response.get("NextToken"), **kwargs) | |
| results = results + response[resource_key] | |
| return results |
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
| #!/bin/bash | |
| # | |
| # AWSCM: Command line tool for quickly switching between AWS profiles. | |
| # To install: | |
| # mkdir ~/.awscm/ | |
| # curl $filepath > ~/.awscm/awscm.sh | |
| # echo 'source ~/.awscm/awscm.sh' >> ~/.bashrc | |
| # echo 'source ~/.awscm/awscm.sh' >> ~/.zshrc | |
| OUTPUT_FORMATS=( |
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
| # You will need to run this in the shell first... | |
| Set-ExecutionPolicy Unrestricted | |
| # Install chocolatey | |
| iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex | |
| # Install my selection of useful software | |
| choco install googlechrome flashplayerplugin javaruntime adobereader 7zip.install atom procexp sysinternals curl mRemoteNG gimp vim python2 python windirstat libreoffice partitionwizard skype macrium | |
| # Finish off the installation of Macrium | |
| (Invoke-Command "C:\tools\ReflectDL.exe") -and (rm "C:\tools\ReflectDL.exe") | |
| # Add a local user |
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
| ###################### | |
| # My CA - Create your own certificate authority! | |
| # for people who need lots of certificates... | |
| # | |
| # Create a workspace and save this Makefile in the workspace | |
| # $ mkdir ~/.ssl/ | |
| # $ curl https://gist.githubusercontent.com/lukeplausin/b1e78b3b55490d91997bcb13532ce663/raw > ~/.ssl/Makefile | |
| # $ cd ~/.ssl/ | |
| # | |
| # $ make ca # Generate the certificate authority |
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
| # From: | |
| # https://dl.photoprism.org/docker/docker-compose.yml | |
| version: '3.5' | |
| # Example Docker Compose config file for PhotoPrism (Linux / AMD64) | |
| # | |
| # Documentation : https://docs.photoprism.org/getting-started/docker-compose/ | |
| # Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/ | |
| # | |
| # Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support |
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
| #!/bin/zsh | |
| # Do merged git branches clutter up your local machine? | |
| # This handy script can automatically clean them up for you. | |
| # To install - put the script somewhere on the filesystem and add a source command to your .bashrc / .zshrc | |
| # e.g. - 'source ~/code/scrapbook/cleanup_git.sh' | |
| # When the script is sourced you will get two commands - | |
| # "gitclean" - delete merged branches in current folder (with prompt) |
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
| #!/bin/sh | |
| # An example hook script to verify what is about to be pushed. Called by "git | |
| # push" after it has checked the remote status, but before anything has been | |
| # pushed. If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # This hook is called with the following parameters: | |
| # | |
| # $1 -- Name of the remote to which the push is being done | |
| # $2 -- URL to which the push is being done |
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 logging | |
| import time | |
| import yaml | |
| from jaeger_client import Config | |
| import os | |
| import datetime | |
| import logging | |
| from logging import StreamHandler |
OlderNewer