A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| /* | |
| * watch_unix_socket.stp | |
| * | |
| * This is a simply more modern version of the script found here: | |
| * https://sourceware.org/systemtap/wiki/WSunixSockets | |
| * | |
| * The first argument is the location of the file descriptor for a UNIX socket. | |
| * To find this address, for example, for the Docker socket run: | |
| * | |
| * # lsof 2>&1 | awk '/docker.sock/ {print $7}' | grep -v '0t0' | sort -u |
| #!/bin/sh | |
| PORT=4200 | |
| sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist | |
| sudo sed -i '' "s/\(<servicePort>\)[^<]*/\1$PORT/" /Library/Application\ Support/CrashPlan/conf/my.service.xml | |
| sed -i '' "s/#*\(servicePort=\).*/\1$PORT/" /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties | |
| defaults write /Applications/CrashPlan.app/Contents/Resources/CrashPlan\ menu\ bar.app/Contents/Info CPPort $PORT | |
| sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist |
| #!/usr/bin/python | |
| # | |
| # Author:: Noah Kantrowitz <[email protected]> | |
| # | |
| # Copyright 2013-2014, Balanced, Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # |
| (setq ruby-deep-indent-paren nil) | |
| (defadvice ruby-indent-line (after unindent-closing-paren activate) | |
| (let ((column (current-column)) | |
| indent offset) | |
| (save-excursion | |
| (back-to-indentation) | |
| (let ((state (syntax-ppss))) | |
| (setq offset (- column (current-column))) | |
| (when (and (eq (char-after) ?\)) | |
| (not (zerop (car state)))) |
| #!/bin/bash | |
| # herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
| # rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
| # compress the data files, create a restore script, and push it all up to S3. | |
| TODAY=`date +"%Y.%m.%d"` | |
| INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
| INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
| BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
| BACKUPDIR="/mnt/es-backups/" | |
| YEARMONTH=`date +"%Y-%m"` |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'rotp' | |
| require 'time' | |
| user = ARGV[0] | |
| secret = ARGV[1] | |
| abort unless user and secret | |
| trap("INT") do |
| bash 'install science app' do | |
| installed_version_file = "#{app[:base_dir]}/.#{app[:version]}-installed" | |
| cwd Chef::Config[:file_cache_path] | |
| code <<-BASH | |
| tar zxf #{app[:tarball]} -C #{app[:deploy_to]} | |
| cp #{app[:tarball]} #{app[:deploy_to]} | |
| touch #{installed_version_file} | |
| BASH | |
| not_if { ::File.exist?(installed_version_file) } | |
| end |
| # | |
| # Cookbook Name:: awsclient | |
| # | |
| include_recipe "aws" | |
| # Removing dependency on api, do not believe it is required. | |
| # include_recipe "apt" | |
| packages = value_for_platform( "centos" => { "default" => %w[libxml2 libxml2-devel libxslt-devel] } ) |
| windows_feature "SNMP" do | |
| action :install | |
| end | |
| windows_feature "WMISnmpProvider" do | |
| action :install | |
| end | |
| # setup some variables | |
| # |