Is it possible to create an async build step? - visual-studio

I would like to start an application from a pre-build step. However, I do not want Visual Studio to wait for the application to close.
Basically, I have a simulation engine that I need to start prior to a debugging session.
Is this possible? I tried commands like "start app.exe" and "cmd start app.exe"...

Is "start /b" what you're looking for? It starts the command and returns immediately.
C:\>start /b ping stackoverflow.com
C:\>
Pinging stackoverflow.com [69.59.196.211] with 32 bytes of data:
Reply from 69.59.196.211: bytes=32 time=153ms TTL=44
C:\>Reply from 69.59.196.211: bytes=32 time=153ms TTL=44
C:\>Reply from 69.59.196.211: bytes=32 time=153ms TTL=44
C:\>
C:\>Reply from 69.59.196.211: bytes=32 time=154ms TTL=44
Ping statistics for 69.59.196.211:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 153ms, Maximum = 154ms, Average = 153ms
C:\>

This is how I ended up doing this.
It was kind of a "duh" moment, but I created a simple console application that starts a process and returns.
Thanks to Eugene for the suggestion.

Related

set proxy through windows command line without login parameters

I have some proxy applications like Ultra-surf or Tor-browser. I can set their proxy in browsers or on other applications. For example for Tor, I can set socks: to "127.0.0.1:9150" in any application.
but I want to using this proxy for CMD.
I saw these answers
netsh winhttp set proxy proxy-server="socks=localhost:9090" bypass-list="localhost"
Or
set HTTP_PROXY=http://proxy_userid:proxy_password#proxy_ip:proxy_port
I opend a CMD as an Administrato, and then I tried these commands. After each one, I tested 3 sites: "google.com" and "facebook.com" and "youtu.be". But noting was changed. "google.com" always works and "facebook.com and youtu.be" do not work. Also, It does not make difference if my proxy apllication be open or not.
Anyone knows how can I set this kind of proxy for CMD?
netsh winhttp set proxy 127.0.0.1:1080
netsh winhttp set proxy proxy-server="socks=127.0.0.1:9150" bypass-list="127.0.0.1"
netsh winhttp set proxy proxy-server="socks=localhost:9150" bypass-list="localhost"
netsh winhttp set proxy proxy-server="http=127.0.0.1:1080" bypass-list="127.0.0.1"
netsh winhttp set proxy proxy-server="https=127.0.0.1:1080" bypass-list="127.0.0.1"
set HTTP_PROXY=127.0.0.1:1080
set HTTPs_PROXY=127.0.0.1:1080
set HTTP_PROXY=#127.0.0.1:1080
set HTTPs_PROXY=#127.0.0.1:1080
set HTTP_PROXY=:#127.0.0.1:1080
set HTTPs_PROXY=:#127.0.0.1:1080
The ping response always is:
For not sensored site:
C:\>ping google.com
Pinging google.com [172.217.18.142] with 32 bytes of data:
Reply from 172.217.18.142: bytes=32 time=198ms TTL=51
Reply from 172.217.18.142: bytes=32 time=94ms TTL=51
Reply from 172.217.18.142: bytes=32 time=95ms TTL=51
Reply from 172.217.18.142: bytes=32 time=102ms TTL=51
Ping statistics for 172.217.18.142:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 94ms, Maximum = 198ms, Average = 122ms
For sensored sites:
C:\WINDOWS\system32>ping youtu.be
C:\WINDOWS\system32>ping facebook.com
Pinging facebook.com [10.10.34.35] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.10.34.35:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Custom domain does not work for homestead

I'm brand new to using homestead for developing laravel sites locally. I followed two different tutorials for setup and have reinstalled about 5 times, but the custom domain name does not work for me. I'm working on a windows 10 machine and am using Virtualbox. I'm able to see the test site when I browse to 192.168.10.10 in my browser. I can ping 192.168.10.10 and get all of the packets send and receive fine. I can also ping obsessories.dev it sends and receives all of the packets successfully. I also tried changing my hosts file to use 127.0.0.1 based on another answer I saw on SO, but that didn't work for me. I use the command
vagrant reload --provision
each time I make any change to Homestead.yaml and my hosts file. I have noticed that firefox and chrome both redirect to https://obsessories.dev, but I'm not sure if that's a problem or not. I appreciate any help or insight on this in advance!
Here is my Homestead.yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:\Users\******\Projects\web\ssh\publickey.pub
keys:
- C:\Users\******\Projects\web\ssh\privatekey.ppk
folders:
- map: C:\Users\******\Projects\web\sites
to: /home/vagrant/code
sites:
- map: obsessories.dev
to: /home/vagrant/code/obsessories/public
databases:
- homestead
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# zray:
# If you've already freely registered Z-Ray, you can place the token here.
# - email: foo#bar.com
# token: foo
# Don't forget to ensure that you have 'zray: "true"' for your site.
output for pinging 192.168.10.10
ping 192.168.10.10
Pinging 192.168.10.10 with 32 bytes of data: Reply from 192.168.10.10:
bytes=32 time<1ms TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms
TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms TTL=64 Reply from
192.168.10.10: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.10.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
output for pinging obsessories.dev
ping obsessories.dev
Pinging obsessories.dev [192.168.10.10] with 32 bytes of data: Reply
from 192.168.10.10: bytes=32 time<1ms TTL=64 Reply from 192.168.10.10:
bytes=32 time<1ms TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms
TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.10.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Joe's suggestion worked for me. I changed the domain to .local instead and reloaded vagrant and works just fine now.

Batch/cmd: saving ping logs to a file and getting the summary paragraph afterwards

I'm trying to use ping to monitor my internet connection overnight and watch for connection dropouts, packet loss, latency spikes, and so on. I have a batch file that pings google each second and records the results to a file:
#echo off
ping -t www.google.com|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p "data=" && echo(!time! !data!)&ping -n 2 localhost>nul" > ping_logs_google.txt
And I get output like this:
16:36:50.47 Pinging www.google.com [209.85.202.106] with 32 bytes of data:
16:36:51.50 Reply from 209.85.202.106: bytes=32 time=31ms TTL=47
16:36:52.52 Reply from 209.85.202.106: bytes=32 time=31ms TTL=47
16:36:53.54 Reply from 209.85.202.106: bytes=32 time=30ms TTL=47
16:36:54.58 Reply from 209.85.202.106: bytes=32 time=29ms TTL=47
16:36:55.61 Reply from 209.85.202.106: bytes=32 time=32ms TTL=47
16:36:56.64 Reply from 209.85.202.106: bytes=32 time=32ms TTL=47
.. and so on. However, when I press Ctrl-C or whatever to stop the task, I want to get the summary paragraph at the end. The one that looks like this:
Ping statistics for 209.85.202.106:
Packets: Sent = 9, Received = 9, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 29ms, Maximum = 34ms, Average = 30ms
Control-C
^C
Now, this does work when I press Ctrl-C after running just "ping -t www.google.com" in the command window itself -- it just doesn't work when I run it from the batch file. How do I make it so that I get the summary paragraph at the end when I'm finished with the batch file?
Instead of running continuously with -t, replace with "-n 100", where "100" is the number of times it will ping (or 1000 if you like). This will give you the summary at the end of your output file the same way it does in the command window. However, you'll want to remove any pauses, etc. and just it rip.

Windows 7 ping general failure

I'm trying to understand the behaviour of ping command. Trying to experiment on a windows 7 PC.
On the command prompt, I issued the following command:
ping <some hostname> -l 4096
The output I get is
Pinging <some hostname> [xx.xx.xxx.xx] with 4096 bytes of data:
General failure.
General failure.
General failure.
General failure.
Ping statistics for xx.xx.xxx.xx:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
However, ping <same hostname> -l 32 works just fine.
So my question is why is the server behaving differently for different packet sizes? Is it related to thwart? Or is that my local ping program is configured by default in such a way so as to not sent bigger packets?
Note that -l flag lets you specify the ping req's buffer size.
Your ping packet is probably larger than the local media's MTU, and it's on a network type where fragmentation isn't allowed. Ethernet IPv6 would be one such configuration.

Windows console command for finding server site is deployed to

I have a url to a site and I vaguely remember there being a Windows console command that you can use to find the IP address of the server the site is deployed to. Can someone remind me? Also, can you tell me how to use it?
if you ping the server using the Windows command prompt, it will gives you the server IP.
ex.: ping www.google.com
C:\Users\Deleu>ping www.google.com
Pinging www.l.google.com [177.99.189.241] with 32 bytes of data:
Reply from 177.99.189.241: bytes=32 time=34ms TTL=58
Reply from 177.99.189.241: bytes=32 time=36ms TTL=58
Reply from 177.99.189.241: bytes=32 time=38ms TTL=58
Reply from 177.99.189.241: bytes=32 time=38ms TTL=58
Ping statistics for 177.99.189.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 34ms, Maximum = 38ms, Average = 36ms
C:\Users\Deleu>
You need nslookup.
Nslookup.exe is a command-line administrative tool for testing and
troubleshooting DNS servers. This tool is installed along with the
TCP/IP protocol through Control Panel. This article includes several
tips for using Nslookup.exe.
c:\Temp>nslookup google.com
Server: BoB.Orcon
Address: 10.1.1.1 <------ Name server
Non-authoritative answer:
Name: google.com
Addresses: 2404:6800:4006:804::1004 <----- Answer in ipv6
74.125.237.128 <----- Answer in ipv4
74.125.237.137 <----- Other answers....
74.125.237.134 .
74.125.237.132 .
74.125.237.135 .
74.125.237.133 etc
74.125.237.136 .
74.125.237.142 .
74.125.237.130 .
74.125.237.131 .
74.125.237.129

Resources