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/sh | |
# Help | |
usage() { | |
echo -e "Usage: $0 <user to switch to>" | |
} | |
# Check if we have enough args | |
if [ $# -ne 1 ] | |
then |
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 | |
# Exit on error | |
set -e | |
TMUX_URL=https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz | |
PREFIX=$HOME/local | |
TMP_DL_DIR="$(mktemp -d --suffix .tmux_install)" | |
cd $TMP_DL_DIR | |
## REQUIREMENTS: |
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
## REQUIREMENTS: | |
# RHEL: | |
# $ sudo yum install python-devel ruby-devel ncurses-devel | |
## SOURCE: | |
# Get from https://github.com/vim/vim/releases | |
# $ wget https://github.com/vim/vim/archive/v7.4.972.tar.gz | |
## INSTALL: |
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
--- | |
- hosts: all | |
gather_facts: no | |
remote_user: root | |
pre_tasks: | |
- name: verify python installed | |
raw: dpkg -s python-simplejson > /dev/null 2>&1 | |
register: python_installed | |
ignore_errors: True |
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
# Both are limited to HVM-based 64-bit AMIs backed by EBS | |
# Red Hat's latest GA images | |
alias ami_rhel="aws ec2 describe-images \ | |
--filters \ | |
'Name=root-device-type,Values=ebs' \ | |
'Name=architecture,Values=x86_64' \ | |
'Name=virtualization-type,Values=hvm' \ | |
'Name=name,Values=*GA*' \ | |
--owners 309956199498 \ |
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
#!/usr/bin/python | |
# | |
# Example run: | |
# time ./test_https_timeout.py example.com 200 10 | |
import httplib | |
import sys | |
from time import sleep | |
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
LastTitle := "" | |
while true { | |
WinGetActiveTitle, Title | |
if (LastTitle != Title) | |
{ | |
LastTitle := Title | |
FileAppend, %LastTitle%`n, %A_Desktop%\active_windows.txt | |
} | |
} |
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 | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
# General Public License <gnu.org/licenses/gpl.html> for more details. |
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
# This is an attempt at creating a caesar cipher using the ord() | |
# function and taking input from the user. | |
import re | |
def caesar_cipher(mode, input_str, key): | |
return_str = '' | |
char_as_num = None | |
num_as_char = None | |
char_after_cipher = None |
OlderNewer