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/sh | |
arping -I eth0 -c 3 10.203.167.71 | |
ifconfig eth0:ncsvip 10.203.167.72 netmask 255.255.255.192 broadcast 10.203.167.127 |
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/sh | |
neutron net-list # find the list the compute hosts are on | |
neutron port-create --name nso-vip 0d7f88a9-09a6-4cb4-8b08-eae94ece9f97 --fixed-ip ip_address=10.114.195.172 # create a port for the vip | |
neutron port-update 2f8c9163-b71f-4c0e-8f1e-751aec8127e9 --allowed-address-pairs type=dict list=true ip_address=10.114.195.172 # add allowed address pairs (do for both ports) |
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
perl -pi -w -e 's/search/replace/g;' $( grep -rl 'search' . ) | |
# Perl arguments | |
# -e means execute the following line of code. | |
# -i means edit in-place | |
# -w write warnings | |
# -p loop over the input file, printing each line after the script is applied to it. | |
# Grep Arguments | |
# r is recursive which defaults to NOT following symbolic links | |
# l is listing the file names only | |
# the . is the directory you want to search in |
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
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ | |
"jsonrpc":"2.0", | |
"id":1, | |
"method":"login", | |
"params":{ | |
"user":"admin", | |
"passwd":"admin" | |
} | |
}' "http://localhost:8080/jsonrpc/" | |
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
/sbin/alternatives --config java | |
/sbin/alternatives --config javac |
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
Connect your iOS device by USB | |
UDID=<get from xcode> | |
ADDR=<address of iphone> | |
rvictl -s $UDID # where UDID is the UDID of your device (located in XCode under Devices, shortcut to with ⇧⌘2) | |
sudo launchctl list com.apple.rpmuxd | |
sudo tcpdump -n -t -i rvi0 -q tcp or $ sudo tcpdump -i rvi0 -n | |
sudo tcpdump 'src $ADDR' -i rvi0 -n -A -w blah.txt |
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
Host x | |
User y | |
HostName z | |
ProxyCommand ssh jumpX@jumpHost nc %h %p 2> /dev/null |
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
mv /srv/nasdaqtraded.txt /srv/nasdaqtraded.txt`date --date="yesterday" +"%m-%d-%Y"` | |
wget ftp://ftp.nasdaqtrader.com/SymbolDirectory/nasdaqtraded.txt | |
mv nasdaqtraded.txt /srv/nasdaqtraded.txt |
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 scala.language.postfixOps | |
import sys.process._ | |
object NasdaqTickerFetcher extends App { | |
val tickers = "wget ftp://ftp.nasdaqtrader.com/SymbolDirectory/nasdaqtraded.txt"!!; | |
println(tickers) | |
} |
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
// Nasdaq Traded|Symbol|Security Name|Listing Exchange|Market Category|ETF|Round Lot Size|Test Issue|Financial Status|CQS Symbol|NASDAQ Symbol|NextShares | |
// 1 - Nasdaq Traded | |
// 2 - Symbol | |
// 3 - Security Name | |
// 4 - Listing Exchange | |
// 5 - Market Category | |
// 6 - ETF | |
// 7 - Round Lot Size | |
// 8 - Test Issue | |
// 9 - Financial Status |
OlderNewer