Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Evolving

Sachin psachin

🚀
Evolving
View GitHub Profile
@psachin
psachin / cfme-rh-sso.yml
Created Jan 8, 2018 — forked from jairojunior/cfme-rh-sso.yml
Playbook to configure CFME login with RH-SSO
View cfme-rh-sso.yml
---
- hosts: all
become: yes
become_user: root
vars:
appliance_file_name: "https_{{ appliance_name }}"
tasks:
- name: SAML configuration dir
@psachin
psachin / 00-readme.md
Created Feb 22, 2017 — forked from briancline/00-readme.md
Test Swift installation (multi-node)
View 00-readme.md

These are based on updated instructions for the Swift multi-node setup guide.

Steps to install on Ubuntu 14.04, assuming at least two machines:

  1. Copy the below 3 scripts to each of your VMs (make sure to chmod +x each of them as well).
  2. Run 01-install-proxy-node.sh only on your proxy.
  3. Run 02-install-storage-node.sh only on each of your storage nodes, prefixing the command with NODE=1, where 1 is the number for that storage node (must start at 1 and increment). For instance: NODE=1 ./02-install-storage-node.sh on your first storage node, NODE=2 ./02-install-storage-node.sh on your second storage node, etc.
  4. For each of the exports provided to you by the storage node install script (STORAGE_N_IP and STORAGE_N_DISKS), copy and paste them into your shell on the proxy. Then, running set | grep -a '^STORAGE_' from your proxy should show you all the storage nodes' exports.
  5. On the proxy, run 03-build-rings.sh. It will show you all the nodes and disks it discovered from your environment, build the
View get-nodes-tests.patch
diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes
index f2e3046..0e9eea9 100755
--- a/bin/swift-get-nodes
+++ b/bin/swift-get-nodes
@@ -19,7 +19,8 @@ import os
from optparse import OptionParser
from swift.common.ring import Ring
-from swift.cli.info import print_item_locations, InfoSystemExit
+from swift.cli.info import (parse_get_node_args, print_item_locations,
View print error on exit
diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes
index d52480e..00ae50a 100755
--- a/bin/swift-get-nodes
+++ b/bin/swift-get-nodes
@@ -52,8 +52,9 @@ if __name__ == '__main__':
try:
ring_path, args = parse_get_node_args(options, args)
- except InfoSystemExit:
- sys.exit(parser.print_help())
View Makefile
obj-m += hello-packet.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
View jdk_download.sh
# Shell script to download Oracle JDK from command prompt / terminal.
# You can download all the binaries one-shot by just giving the BASE_URL.
## Features:
# Resumes a broken [previous] download, if any.
# Renames the file to a proper name with platform adding platform info.
# Downloads all the following from Oracle Website with one shell invocation.
# a. Windows 64 and 32 bit;
# b. Linux 64 and 32 bit; and
# c. API Docs.
View orgtbl-config.el
(defun yh/orgtbl-to-rst-paddings (table)
(let* ((pruned-table (remove 'hline table))
(size-table (mapcar (lambda (row)
(mapcar #'length row))
pruned-table)))
(apply #'mapcar* #'max size-table)))
(defun yh/orgtbl-padded-hline (paddings &optional chr)
(let ((chr (or chr ?-)))
(concat (format "+%c" chr)
View directory-files-recursive.el
;;;
;;; Recursively list files in a given directory
;;;
;;; Author: daniel m german dmg at uvic dot ca
;;; Copyright: daniel m german
;;; License: Same as Emacs
;;;
(defun directory-files-recursive (directory match maxdepth ignore)
"List files in DIRECTORY and in its sub-directories.
Return files that match the regular expression MATCH but ignore
View python-pep8.el
;;; python-pep8.el --- minor mode for running `pep8'
;; Copyright (c) 2009, 2010 Ian Eure <ian.eure@gmail.com>
;; Author: Ian Eure <ian.eure@gmail.com>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
View gistcheck.py
# Source: https://gist.github.com/4702275
#
# All-purpose gist tool for Pythonista.
#
# When run directly, this script sets up four other scripts that call various
# functions within this file. Each of these sub-scripts are meant for use as
# action menu items. They are:
#
# Set Gist ID.py - Set the gist id that the current file should be
# associated with.