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
VAR=$([ "$(git diff --name-status HEAD HEAD^ | grep tests/ | wc -l | xargs)" -ge "1" ] && echo "yes" || echo "no") |
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
1. "Show Package Contents" on the GoLand.app | |
2. Edit Contents/Info.plist | |
3. Add | |
<key>LSEnvironment</key> | |
<dict> | |
<key>PATH</key> | |
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin</string> | |
</dict> | |
4. Run `/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user` |
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 | |
# | |
# Ouptuts the number of tasks running per AZ for a given service on a given ECS cluster | |
# | |
# | |
# Boilerplate to setup a temp dir since we save some files for intermediate processing | |
# | |
set -e -o pipefail |
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
def pytest_collection_modifyitems(session, config, items): | |
"""Reorder the execution of tests based on the dependency marks on tests. | |
To setup a test dependency, decorate the test function with the "depends" | |
mark and give a list of dependencies via the "on" keyword arg to the | |
decorator. Dependencies can be specified by name only when in the same | |
file as the test being decorated, or by pytest node path for tests in | |
other files/classes. | |
@pytest.mark.depends(on=["test_in_same_file", |
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
# syslog-ng.conf | |
@version: 3.12 | |
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no); | |
owner("root"); group("adm"); perm(0640); stats_freq(0); | |
bad_hostname("^gconfd$"); | |
}; | |
source s_src { | |
network( |
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
exiftool '-Directory<DateTimeOriginal' -d %Y-%m-%d dir |
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 json | |
import requests | |
import gdata.photos.service | |
GOOGLE_ALBUM_ID = 0 | |
GOOGLE_EMAIL = "[email protected]" | |
GOOGLE_PASSWORD = "hunter42" | |
FB_ACCESS_TOKEN = "" |
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
# bashrc | |
. ~/.newtab.sh | |
tssh() { ssh `aws_name_to_ip $1` | sed -n "${2:-1}p"; } | |
aws_name_to_ip() { | |
if [ -z "$VIRTUAL_ENV" ]; then | |
workon aws; | |
fi | |
aws ec2 describe-instances --filters "Name=tag-value,Values=$1" --output text --query 'Reservations[*].Instances[*].PrivateIpAddress' | sort; | |
} |
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
include: | |
- requirements | |
nodejs: | |
pkg.installed | |
statsd: | |
git.latest: | |
- name: https://github.com/etsy/statsd.git | |
- rev: v0.7.0 |
NewerOlder