Skip to content

Instantly share code, notes, and snippets.

@bagonyi
bagonyi / deploy.sh
Created January 21, 2017 10:03
Deploy code to AWS Lambda from IntelliJ on save
#!/usr/bin/env bash
# Deploy code to AWS Lambda
# Dependencies
# awscli (brew install awscli), set up guide: https://aws.amazon.com/cli/
# Usage with IntelliJ
# 1. Drop me (deploy.sh) into your project root
# 2. Create dir "aws-dist" in your project root, right click on it and "Mark directory" as "Excluded"
diff --git a/scripts/toggle_logging.sh b/scripts/toggle_logging.sh
index 9299973..baafad2 100755
--- a/scripts/toggle_logging.sh
+++ b/scripts/toggle_logging.sh
@@ -13,11 +13,15 @@ get_filename() {
start_pipe_pane() {
local filename="$(get_filename)"
+ local window_name=$(tmux display -p "#W")
+ tmux rename-window "${window_name}<U+1F534>"
@bagonyi
bagonyi / fix.txt
Created March 4, 2016 16:38
OS X El Capitan ZSH order of PATH set in .zshenv is not respected
According to http://www.zsh.org/mla/users/2015/msg00727.html the order gets overwritten by path_helper.
If you move your $PATH settings from ~/.zshenv to ~/.zprofile path_helper won't override your PATH settings.
@bagonyi
bagonyi / README.md
Last active May 23, 2017 16:20
TotalSpaces2 - Change name of current space

This setup will let you change the name of the current space by using a keyboard shortcut.

Requirements:
  1. Registered version of TotalSpaces2
  2. CocoaDialog
  3. totalspaces2 ruby gem
  4. BetterTouchTool
Installation:
  1. Install and register a copy of TotalSpaces2
  2. Download and install CocoaDialog from http://mstratman.github.io/cocoadialog/
@bagonyi
bagonyi / audit-dir
Last active August 29, 2015 14:16
Audits a directory and logs changes. It is a copy & paste of Watchdog's example: http://pythonhosted.org//watchdog/quickstart.html#a-simple-example. Requirements: Python 2.6+, Watchdog (pip install watchdog). Installation: add audit-dir to your PATH and make it executable (chmod +x audit-dir). Usage: cd to the dir you want to audit and run audit…
#!/usr/bin/python
# Example output:
#
# 2015-03-02 14:23:57 - Created directory: ./test
# 2015-03-02 14:23:57 - Modified directory: .
# 2015-03-02 14:25:21 - Created file: ./test/a.txt
# 2015-03-02 14:25:21 - Modified directory: ./test
# 2015-03-02 14:25:21 - Modified file: ./test/a.txt
# 2015-03-02 14:25:41 - Moved file: from ./test/a.txt to ./test/b.txt