This file contains hidden or 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
| $vpnName = "connection mane" | |
| $vpnUsername = "user" | |
| $vpnPassword = "password `$ with escaped dollar sign" | |
| $ip = "10.10.10.51" # some site in vpn to test access to | |
| $result = gwmi -query "SELECT * FROM Win32_PingStatus WHERE Address = '$ip'" | |
| if ($result.StatusCode -eq 0) { | |
| Write-Host "$ip is up." | |
| } | |
| else{ |
This file contains hidden or 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 | |
| # PATH TO YOUR HOSTS FILE | |
| ETC_HOSTS=/etc/hosts | |
| # DEFAULT IP FOR HOSTNAME | |
| IP="127.0.0.1" | |
| # Hostname to add/remove. | |
| HOSTNAME=$1 |
This file contains hidden or 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
| # | |
| # Powershell script for adding/removing/showing entries to the hosts file. | |
| # | |
| # Known limitations: | |
| # - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
| # | |
| $file = "C:\Windows\System32\drivers\etc\hosts" | |
| function add-host([string]$filename, [string]$ip, [string]$hostname) { |
This file contains hidden or 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
| ~/sources/libsodium-0.6.0 > ./configure | |
| checking build system type... x86_64-unknown-linux-gnu | |
| checking host system type... x86_64-unknown-linux-gnu | |
| checking for a BSD-compatible install... /usr/bin/install -c | |
| checking whether build environment is sane... yes | |
| checking for a thread-safe mkdir -p... /bin/mkdir -p | |
| checking for gawk... gawk | |
| checking whether make sets $(MAKE)... yes | |
| checking whether make supports nested variables... yes | |
| checking whether UID '1000' is supported by ustar format... yes |
This file contains hidden or 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 'active_support' | |
| require 'active_support/dependencies' | |
| relative_load_paths = %w[app/controllers app/models] | |
| ActiveSupport::Dependencies.autoload_paths += relative_load_paths |
This file contains hidden or 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
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
This file contains hidden or 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
| source /home/zloy/.screenrc | |
| screen -t 'rails c' 0 | |
| screen -t 'shell' 1 | |
| screen -t 'vim' 2 | |
| screen -t 'guest' 3 | |
| screen -t 'rails s' 4 | |
| select 0 | |
| stuff "cd ../vbox && vagrant ssh -- -t 'source ~/.bash_profile && cd my_src/organization/app && bundle exec rails c && /bin/bash'^M" |
This file contains hidden or 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
| Put to `bin/rspec_vagrant` file | |
| #!/bin/bash | |
| (cd ../vbox && vagrant ssh -c 'source ~/.bash_profile && cd my_src/latera/loms && bundle exec rspec') | |
| Put to `.overcommit.yml` | |
| PrePush: | |
| RSpec: | |
| command: bin/vagrant_rspec |