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
require "win32/registry" | |
interface_path = "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces" | |
Win32::Registry::HKEY_LOCAL_MACHINE.open(interface_path, Win32::Registry::KEY_READ) do |interfaces| | |
interfaces.each_key do |guid, _| | |
guid_path = "#{interface_path}\\#{guid}" | |
interface = Win32::Registry::HKEY_LOCAL_MACHINE.open(guid_path) | |
begin |
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
<?php | |
//... | |
namespace Tests\ApiBundle\TestCase; | |
//... | |
use Liip\FunctionalTestBundle\Test\WebTestCase as WebTestCase; | |
//... |
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 | |
PUPPET_SERVER_CANONICAL='foreman.company.tld' | |
EL_RELEASE=$(rpm -E %centos) | |
# Failed to determine EL_RELEASE. So, we are probably using Amazon Linux. | |
# And Amazon Linux is equivalent to EL 6 | |
if [ $EL_RELEASE = '%centos' ]; then | |
EL_RELEASE=6 |
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
# Copied from http://jbisbee.blogspot.com.br/2013/07/add-history-and-tab-completion-to.html | |
try: | |
import readline | |
import rlcompleterimport atexit | |
import os | |
except ImportError: | |
print "Python shell enhancement modules not available." | |
else: | |
histfile = os.path.join(os.environ["HOME"], ".pythonhistory") | |
import rlcompleter |
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
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
set-option -g pane-border-fg colour235 #base02 | |
set-option -g pane-active-border-fg colour240 #base01 | |
set-option -g prefix C-a | |
bind-key C-a last-window | |
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." |
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
function FindProxyForURL(url, host){ | |
var myip = myIpAddress(); | |
var ipbits = myip.split("."); | |
var myseg = parseInt(ipbits[3]); | |
if(myseg == Math.floor(myseg/2)*2){ | |
proxy = 'PROXY 165.225.131.153:80; PROXY 165.225.130.193:80'; | |
} else { | |
proxy = 'PROXY 165.225.130.193:80; PROXY 165.225.131.153:80'; | |
} | |
if((host == 'localhost')||(shExpMatch(host, 'localhost.*'))||(shExpMatch(host, '*.local'))||(host == '127.0.0.1')){ |