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
import adsk.core | |
import adsk.fusion | |
import csv | |
import os | |
import os.path | |
# Inspired by: https://forums.autodesk.com/t5/fusion-360-design-validate/parts-list-with-dimensions/m-p/9642058/highlight/true#M223047 | |
def run(context): |
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
zcat very-large.gff3.gz | awk '{ print $0 | "gzip > split." $1 ".gff3.gz"; }' |
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
with pd.option_context('display.max_rows', None, 'display.max_columns', 3): | |
print(df[['sequence', 'mismatches']]) |
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 | |
# usage: add_to_dock.sh <path to your .app bundle or directory> | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>${1}</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
killall Dock |
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
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock |
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 | |
# usage: set_icon.sh <some.icns or image_file> <folder or file path> | |
# Based on: http://www.amnoid.de/icns/makeicns.html | |
icon="$1" | |
target="$2" | |
if [[ -d "${target}" ]]; then | |
target_icon="${target}"/$'Icon\r' | |
else | |
target_icon="${target}" |
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 [[ " $* " =~ ' flag ' ]]; then | |
echo "Flag is present" | |
else | |
echo "Flag is missing" | |
fi |
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
lsof -n -P -iTCP -sTCP:LISTEN |
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
cat mess.json | python -m json.tool > order.json |
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/python | |
# usage: cs listVirtualMachines | ./load_stats.py | |
import json | |
import sys | |
vms = json.load(sys.stdin) | |
if vms.get('count', 0) > 0: | |
output = list() |
NewerOlder