View query.sh
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
aws ec2 describe-images --owners amazon --filters "Name=name,Values=Windows_Server-2016-English-Core-Base*" --query 'Images[*].[ImageId, Name]' |
View main.ps1
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-Module IISAdministration | |
$timeSpan = New-TimeSpan -Minutes 0 | |
$manager = Get-IISServerManager | |
$pool = $manager.ApplicationPools["$poolName"] | |
$pool.ChildElements["processModel"].Attributes["idleTimeout"].Value = $timeSpan | |
$manager.CommitChanges() |
View gist:058e6d6a062af2796b96
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="foo.gif" | |
echo "File name - ${VAR%.*}" | |
echo "File extension - ${VAR#*.}" |
View Updating GO
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
gvm install go1.4 | |
gvm use go1.4 | |
export GOROOT_BOOTSTRAP=$GOROOT | |
gvm install go1.5 |
View addusers.sh
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 | |
clear | |
users=(user1:pass user2:pass user3:pass) | |
for user in "${users[@]}" | |
do | |
password=${user##*:} | |
username=${user%:*} | |
echo Adding $username with Password $password |
View puma.service
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
[Unit] | |
Description=Puma application server | |
After=syslog.target network.target remote-fs.target nss-lookup.target | |
[Service] | |
User=rails | |
WorkingDirectory=/vagrant/testApp | |
PIDFile=/vagrant/testApp/shared/pids/puma.pid | |
ExecStart=/bin/bash -lc 'bundle exec puma -C config/puma.rb' | |
Restart=always |
View update.py
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
## {{{ http://code.activestate.com/recipes/577708/ (r1) | |
#!/usr/bin/env python | |
import xmlrpclib | |
import pip | |
pypi = xmlrpclib.ServerProxy('http://pypi.python.org/pypi') | |
for dist in pip.get_installed_distributions(): | |
available = pypi.package_releases(dist.project_name) | |
if not available: |
View .bashrc
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
# Show git branch when in a git repo | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
export PS1='\[\033[0;32m\]\u@\h\[\033[0;36m\]\w\[\033[0;33m\]$(parse_git_branch)\[\033[00m\]: ' |
View .conkyrc_good
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
# Conky, a system monitor, based on torsmo | |
# | |
# Any original torsmo code is licensed under the BSD license | |
# | |
# All code written since the fork of torsmo is licensed under the GPL | |
# | |
# Please see COPYING for details | |
# | |
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen | |
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS) |