wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install powershell
hash -r
pwsh
Install-Module -Name PSWSMan
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 | |
# Disable web URL link previews in Apple Mail under macOS 13.x Ventura (14.x+ has a UI setting to do so). | |
# from: | |
# https://apple.stackexchange.com/questions/450339/turn-off-link-preview-in-mail#comment669426_457934 | |
sudo defaults write /Library/Preferences/FeatureFlags/Domain/Mail.plist RichLinks -dict-add Enabled -bool NO | |
sudo chmod -R o+rX /Library/Preferences/FeatureFlags |
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 | |
sudo powermetrics --samplers smc |grep -i "CPU die temperature" | |
# or thermal pressure: | |
# sudo powermetrics -s thermal | grep "Current pressure" | |
# ...or just install the "Hot" menubar app: | |
# https://github.com/macmade/Hot |
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 | |
if [ $# -eq 0 ]; then | |
echo "This script can be used to transfer all files from a BaseSpace project " | |
echo "Usage: $0 BaseSpaceProjectName DNAnexusProjectName" | |
echo " Before running, be sure to log in to BaseSpace" | |
echo " bs auth" | |
echo " The CLI toolkits for bs and dx can be found here and must be installed first:" | |
echo " https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview" | |
exit 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
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "This script can be used to transfer all files from a DNAnexus project to a GS bucket for Terra." | |
echo "Usage: $0 DNAnexus_project-id:/path/to/recurse gs://bucket/path [pattern_to_match]" | |
echo " Before running, be sure to log in to both BaseSpace and DNAnexus via:" | |
echo " dx login" | |
echo " The CLI toolkits for bs and dx can be found here and must be installed first:" | |
echo " https://documentation.dnanexus.com/downloads" | |
exit 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
#!/bin/bash | |
# First get auth token: https://api.firecloud.org/#/Profile/getProxyGroup | |
# Check to see if a pipe exists on stdin. | |
if [ -p /dev/stdin ]; then | |
while IFS= read emailaddress; do | |
printf "$emailaddress\t" | |
curl -X 'GET' \ | |
"https://api.firecloud.org/api/proxyGroup/$(echo $emailaddress | sed 's/@/%40/')" \ |
This creates a daemon job to watch VPN and Wi-Fi state to ensure the native macOS VPN is active if it drops and is no longer active, or if there is a change in Wi-Fi state (as in the case of Wi-Fi being turned on).
- customize the string variables at the top of
vpn-killswitch.sh
to the name of your Wi-Fi network and VPN configuration - Place the
vpn-killswitch.sh
file somewhere, make it executable (chmod u+x vpn-killswitch.sh
) - alter the full path to whereever the script was placed in the
on-network-change.job.plist
file - (Change the line with
/Users/MYUSERNAME/full/path/to/vpn-killswitch.sh
)
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 python | |
import re, sys, os | |
from stat import S_ISFIFO | |
import argparse | |
# quick and dirty script to show emoji or bars for samtools mpileup quality scrores | |
# extra verbose so this does not require any external libraries | |
# based on fastqe and emojify: | |
# https://raw.githubusercontent.com/fastqe/fastqe/master/fastqe/fastqe_map.py |
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
||id.google.com^ | |
||accounts.google.com/gsi/$3p |
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 python | |
import sys, re | |
flowcell_to_machine_model_and_chemistry = { | |
r'[A-Z,0-9]{5}AAXX':{ | |
"machine": "Illumina Genome Analyzer IIx", | |
"chemistry": "All", | |
"lane_count": 8, | |
"note": "" |
NewerOlder