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
#!/usr/bin/env python3 | |
""" | |
Save or restore X11 desktop window arrangement. | |
Requires the `wmctrl` package to work. | |
Examples: | |
window_arrange.py save | |
window_arrange.py restore | |
window_arrange.py --profile ~/.winlayout-home save |
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
#!/usr/bin/env bash | |
# Install or upgrade any JetBrains product on Linux, assuming it is distributed as a tarball | |
# and has the entry point at $INSTALL_DIR/bin/$PRODUCT.sh | |
# Tested on IDEA, PyCharm, CLion, DataGrip 2016-2018.* | |
# Usage: | |
# install-jetbrains-product.sh [ProductName] [DownloadURL] | |
# | |
# Example: |
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
#!/usr/bin/env bash | |
fetch() { | |
echo "Removing brew cache" | |
local cache=$(brew --cache) | |
rm -rf "$(brew --cache)" | |
mkdir "$cache" | |
mkdir "$cache/Casks" | |
echo "Running brew update" | |
brew update |
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
# Predict the survival of RMS Titanic passengers using logistic regression. | |
# Based on Kaggle Titanic dataset: https://www.kaggle.com/c/titanic/data | |
# | |
# You might need to install Amelia and ROCR packages. | |
cleanData <- function(rawData) { | |
# Uncomment these two lines to visualize the missing data. | |
# library(Amelia) | |
# missmap(trainingData, main="Missing vs. observed values") |
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
#!/usr/bin/bash | |
# ---------------------- | |
# 00-common-vars.sh | |
# ---------------------- | |
# =========== CONFIG ============= | |
# Assuming we'll set the Dropbox folder to ~/Dropbox | |
DROPBOX_FOLDER=$HOME/Dropbox | |
# ================================ |
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
#!/usr/bin/env bash | |
GATEWAY=gateway.company.com | |
DOMAIN=company.local | |
RESOLUTION=1920x1080 | |
if [ -z "$1" ]; then | |
read -p "Computer name (e.g. CP1234): " COMPUTERNAME | |
else | |
COMPUTERNAME=$1 |
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
#!/usr/bin/env python | |
""" | |
Clone all GitHub Gists for the specified user. | |
Copyright (c) 2018 Yuriy Guts | |
usage: gist-clone-all.py [-h] user token | |
positional arguments: | |
user Which user's Gists to clone. |
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
#!/usr/bin/env python | |
import os | |
import subprocess | |
import sys | |
confirmation = raw_input("This script may DISCARD YOUR UNCOMMITTED CHANGES. Are you sure (Y/N)? ") | |
if confirmation.lower() != "y": | |
sys.exit(1) |
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
#!/usr/bin/env python | |
""" | |
Update all Git repos in the current directory. Fast-forward only, no merge commits. | |
Copyright (c) 2018 Yuriy Guts | |
usage: git-update-all.py | |
""" | |
from __future__ import division, print_function |
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
#!/usr/bin/env python | |
""" | |
Clone all public and private repositories from a GitHub user or organization. | |
Copyright (c) 2018 Yuriy Guts | |
usage: github-clone-all.py [-h] [--auth-user AUTH_USER] | |
[--auth-password AUTH_PASSWORD] [--clone-user USER] | |
[--clone-org ORG] |