adduser NON-ROOT-USER -G wheel
passwd NON-ROOT-USER
# login as NON-ROOT-USER
ssh-keygen
export VIRTHOST=127.0.0.2
ssh-copy-id root@$VIRTHOST
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/env python | |
import numpy as np | |
# Know the delimiter used(Useful to differentiate between a space and tab). | |
# f = open('test.txt') | |
# lines = f.readlines() | |
# print lines | |
# Uncomment below line to import data from a file. |
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
;; Commit template location. | |
;; It can also be ~/.gitmessage.txt | |
(defcustom commit-template "./.git/COMMIT_EDITMSG" | |
"Path to custom message template file. If nil, no custom | |
message will be inserted to *magit-edit-log* buffer. The path can | |
be relative as well as absolute." | |
:group 'magit | |
:type 'string) | |
;; and modify this function accordingly |
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
# `bashPrompt.sh` is located at: https://raw.githubusercontent.com/psachin/bash_scripts/master/bashPrompt.sh | |
source bashPrompt.sh | |
PS1='\n{\[\033[35m\]$(current_date)\[\e[0m\]}\n[\[\e[01;30m\]\w\[\e[0m\]]-(\[\033[35m\]$(list_dirs) dirs, $(list_files) files\[\e[0m\])\n\[\e[0;34m\]\u\[\e[0m\]\[\e[0;35m\]@\[\e[0m\]\[\e[0;31m\]\h\[\e[0m\]\[\e[0;32m\]:\[\e[0m\]\[\e[0;32m\]$(parse_git_branch)$(which_user)\[\e[0m\] ' | |
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/env bash | |
# Objective is to ssh IPaddr in an array and use the consecutive IPaddr in the conf file. | |
# Something like this: | |
# ssh 192.168.0.1 -C "echo 192.168.0.2 >> ~/ips" | |
# ssh 192.168.0.2 -C "echo 192.168.0.3 >> ~/ips" | |
# ssh 192.168.0.3 -C "echo 192.168.0.4 >> ~/ips" | |
# ssh 192.168.0.4 -C "echo 192.168.0.1 >> ~/ips" | |
x="192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.4" | |
arr=($(echo $x | tr " " "\n")) |
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
[[local|localrc]] | |
HOST_IP=10.65.10.65 | |
SERVICE_HOST=10.65.10.65 | |
MYSQL_HOST=localhost | |
RABBIT_HOST=10.65.10.65 | |
GLANCE_HOSTPORT=10.65.10.65:9292 | |
ADMIN_PASSWORD=redhat | |
DATABASE_PASSWORD=redhat | |
RABBIT_PASSWORD=redhat | |
SERVICE_PASSWORD=redhat |
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
# Single script to setup ManageIQ development environment on Fedora | |
# Usage: | |
# - It is recommended to have fresh(and dedicated) Fedora installation | |
# - Download THIS script and execute using the command | |
# ~~~ | |
# bash setup_manageiq_fedora.sh | |
# ~~~ | |
# Tested on Fedora 24, 25 |
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
heat_template_version: 2016-10-14 | |
description: Simple template to deploy a single compute instance. Need to change image name | |
parameters: | |
image: | |
type: string | |
description: Image name or id | |
default: cirros |
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
diff --git a/lisp/battery.el b/lisp/battery.el | |
index b1834f06ff8d..dd0b8f652426 100644 | |
--- a/lisp/battery.el | |
+++ b/lisp/battery.el | |
@@ -58,7 +58,7 @@ | |
((and (eq system-type 'gnu/linux) | |
(file-directory-p "/proc/acpi/battery")) | |
#'battery-linux-proc-acpi) | |
- ((and (eq system-type 'gnu/linux) | |
+ ((and (or (eq system-type 'gnu/linux) (eq system-type 'gnu)) |
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
# Author: Niladri Roy <niroy@redhat.com> | |
# Usage: | |
# 1) without specifing evm.log file | |
# curl -s https://gist.githubusercontent.com/psachin/36c7e4ff04bdd0a07a64065d0c477eaf/raw | bash - | |
# 2) specify file name | |
# curl -s https://gist.githubusercontent.com/psachin/36c7e4ff04bdd0a07a64065d0c477eaf/raw | bash -s evm.log-20171103 | |
if [ -z $1 ]; | |
then | |
EVM="evm.log" |
OlderNewer