View test_expand_path.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
import os | |
import json | |
def _expand_paths(path): | |
""" | |
Expand wildcarded paths | |
""" | |
import re | |
dir_name = os.path.dirname(path) |
View compile_tor.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
# tor-0.2.8.9 | |
./configure -prefix="$HOME/Downloads/tor-0.2.8.9/build" --bindir="$HOME/bin" | |
make | |
make install |
View dhajare.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
rm file1.txt | |
for i in `openstack server list -f value -c Name`; do | |
SERVER_DETAIL=$(openstack server show inst2 -c created -c flavor -c project_id -f value | tr '\r\n' ' ') | |
created=$(echo $SERVER_DETAIL | awk '{print $1}') | |
flavor=$(echo $SERVER_DETAIL | awk '{print $2}') | |
project_id=$(echo $SERVER_DETAIL | awk '{print $4}') | |
FLAVOR_DETAIL=$(openstack flavor show $flavor -f value -c disk -c ram -c vcpus) | |
disk_size_gb=$(echo $FLAVOR_DETAIL | awk '{print $1}') | |
ram_mb=$(echo $FLAVOR_DETAIL | awk '{print $2}') | |
cpus=$(echo $FLAVOR_DETAIL | awk '{print $3}') |
View telemetry.yaml
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 config is extremely resource intensive, so we disable telemetry | |
# in order to reduce the overall memory footprint | |
# This is not required in newton | |
telemetry_args: >- | |
{% if release != 'newton' %} | |
-e {{ overcloud_templates_path }}/environments/disable-telemetry.yaml | |
{% endif %} |
View pytest_notes.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
py.test -svk legacy_usb --cov=telemetry.rules.plugins.rhev.rhev_vm_using_legacy_usb_devices |
View erc-desktop-notifications.diff
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/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el | |
index 84db0f58e46d..2978f6362279 100644 | |
--- a/lisp/erc/erc-desktop-notifications.el | |
+++ b/lisp/erc/erc-desktop-notifications.el | |
@@ -52,11 +52,18 @@ | |
:group 'erc-notifications | |
:type '(choice (const :tag "Session bus" :session) string)) | |
+(defcustom erc-notifications-show-channel nil | |
+ "Show channel name in notification." |
View network
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
config interface 'loopback' | |
option ifname 'lo' | |
option proto 'static' | |
option ipaddr '127.0.0.1' | |
option netmask '255.0.0.0' | |
config interface 'lan' | |
option ifname 'eth0' | |
option type 'bridge' |
View hotspotd_arch_linux_deps.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
git clone https://github.com/psachin/hotspotd.git -b py3 | |
pacman -S wireless_tools hostapd # for `iwconfig` |
View demo_dro.rb
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
irb(main):024:0> dro_class = $evm.vmdb(:generic_object_definition).find_by(:name => "demo_dro") | |
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0 | |
PostgreSQLAdapter#log_after_checkin, connection_pool: size: 5, connections: 1, in use: 0, waiting_in_queue: 0 | |
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0 | |
PostgreSQLAdapter#log_after_checkin, connection_pool: size: 5, connections: 1, in use: 0, waiting_in_queue: 0 | |
=> #<MiqAeServiceGenericObjectDefinition:0x1b5f38c @object=#<GenericObjectDefinition id: 6, name: "demo_dro", description: "Used for enablement", properties: {:attributes=>{"name"=>:string, "is_tired"=>:boolean, "created"=>:datetime, "retirement"=>:datetime}, :associations=>{}, :methods=>["kick", "laugh_at", "punch", "buy_a_drink"]}, created_at: "2017-12-04 19:57:17", updated_at: "2017-12-06 16:43:42">, @virtual_columns=["generic_objects_count", "href_slug", "region_description", " |
View LearnDRO.rb
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
[root@localhost vmdb]# rails c | |
Loading production environment (Rails 5.0.6) | |
irb(main):001:0> $evm=MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new) | |
=> #<MiqAeMethodService::MiqAeService:0x0000000b647188 @drb_server_references=[], @inputs={}, @workspace=#<MiqAeEngine::MiqAeWorkspaceRuntime:0x0000000b6473b8 @readonly=false, @nodes=[], @current=[], @datastore_cache={}, @class_methods={}, @dom_search=#<MiqAeEngine::MiqAeDomainSearch:0x0000000b6472c8 @fqns_id_cache={}, @fqns_id_class_cache={}, @partial_ns=[], @prepend_namespace=nil>, @persist_state_hash={}, @current_state_info={}, @state_machine_objects=[], @ae_user=nil, @rbac=false>, @persist_state_hash={}, @logger=#<Vmdb::Loggers::MulticastLogger:0x000000039a3aa0 @loggers=#<Set: {#<VMDBLogger:0x000000039a3cf8 @progname=nil, @level=1, @default_formatter=#<Logger::Formatter:0x000000039a3c58 @datetime_format=nil>, @formatter=#<VMDBLogger::Formatter:0x000000039a3b40 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x000000039a3c08 @shift |
NewerOlder