TeamCity Behind a Proxy

You run TeamCity Server behind an outbound proxy server. You want to run, say, HipChat Notifier, but where do you tell TeamCity that it should use a proxy? I’ve seen 3 different mentions of how. Here’s the one that actually worked:

In your TeamCity\bin folder (not the TeamCity Data folder), create a file named “teamcity-init.bat” an put the following contents in it (the “^” make it all easier to read). In my case it was c:\TeamCity\bin\:

set TEAMCITY_SERVER_OPTS=%TEAMCITY_SERVER_OPTS% ^
-Dproxyset=true ^
-Dhttp.proxyHost= ^
-Dhttp.proxyPort= ^
-Dhttp.nonProxyHosts= ^
-Dhttps.proxyHost= ^
-Dhttps.proxyPort= ^
-Dhttps.nonProxyHosts=

Then, restart TeamCity.

TeamCity Docs (not very helpful):

https://confluence.jetbrains.com/pages/viewpage.action?pageId=74847395#HowTo…-ConfigureTeamCitytoUseProxyServerforOutgoingConnections

YouTrack ticket (very helpful), but those bullet points should actually be “-” in front of each line:

https://youtrack-support.jetbrains.com/hc/en-us/community/posts/206588055-How-can-we-configure-TeamCity-to-use-our-proxy-IP-and-username-password-

OneDrive Offline Files and Windows 10

You just realized that in Windows 10 you cannot open OneDrive and see all the files up on OneDrive unless you have synced all the folders to your PC (imagine you didn’t upgrade to the 2 TB SSD on that new computer, so there is no way you can have all your OneDrive files synced).

Well, apparently, OneDrive for Windows 8 still has this feature (which is one of those that differentiated OneDrive from Dropbox or Google Drive). However, OneDrive in Windows 10 has it disabled…. something about some users were all confused about it.

The good news is that reportedly in Windows 10 Redstone update (in June 2016), the offline files support will be again available on the OneDrive for Windows 10 product. Yay! Now, if they could just add file revision history for *all* files and not just “Office” files, whatever that really includes…. then, welll, OneDrive would top Dropbox and Google Drive in quite a few ways (some have had some sync issues, but I think that’s becoming a thing of the past).

Alright, that news is great and all, but what if you want to be able to see all your OneDrive stuff *NOW* without having to have it synced locally. Here’s how to do it:

Map a network drive (from here: http://club.myce.com/f186/how-map-onedrive-network-drive-letter-337440/)

1. Open up your OneDrive account online
2. Right-click on the “Files” button on the left of the screen and select “copy link address”.
3. Take the “cid” querystring value from that URL
4. Go to This PC > right click in the white space > Map Network Location > next next next > paste in “https://d.docs.live.net/” followed by that “cid” querystring value from above > ok next ok ok ok… whatever
5. That effectively maps OneDrive as though it were a drive on your computer, meaning all your OneDrive files are viewable, downloadable, and accessible anytime you have an internet connection.

Pretty sweet workaround for now. Only downside is that the Offline Files feature in OneDrive does a better/faster job at caching things like the files/folders list as well as thumbnails (all the metadata).

Great Linx Upstart step-by step

Running Tomcat as a resilient service on Ubuntu 14.04

This is the best I’ve come across. Granted, I’ve not spent a ton of time having to look, but when I have it’s not been this clear.

You can just run pretty much anything you want in that last “exec….” part. Just route the output to /dev/null 2>&1 and you’re set.

Then run it with:
initctl start myservice
initctl stop myservice

create a file at /etc/init/myservice.conf with the following contents:

description “Tomcat 7 service”
#So that you remember what the services does

start on runlevel [2345]
# When the service should start. 2, 3, 4 and 5 are
# runlevels that are various flavours of system startup.

stop on runlevel [06]
# 0 is for system halt and 6 is for system reboot

respawn
# If the service is stopped otherwise than with a proper ‘stop’
# message (system halt or reboot), the service will restart automatically

respawn limit 3 10
# In case the service cannot boot properly (e.g. misconfiguration),
# this prevents the service to go crazy an reboot endlessly.
# 3 10 means “don’t respawn more than 3 times in 10 seconds”

pre-start exec /home/admin/init_casanovald.sh
# pre-start, post-start and pre-stop enable you
# to run stuff before or after starting a service

exec /var/lib/tomcat7/bin/catalina.sh run >> “/var/lib/tomcat7/logs/catalina.out” 2>&1
# This is where the service actually gets started. If you don’t
# redirect the messages, they end in /var/log/syslog.

Enable Data Deduplication on Windows 8.1

Recently I encountered the situation where I was needing to recover some data from an old test I had been doing with Storage Spaces on Windows Server 2012. However, my machine was running Windows 8.1. I really didn’t want to go through the process of setting up a new machine somewhere, so I figured I’d see if I could somehow enable Data Deduplication on 8.1.

I had been seeing a lot of files that had a size of, say, 1.82MB but a “size on disk of 0KB. That may be a giveaway that you’re looking at a disk that’s had data deduplication turned on.

Well, it works, and here’s where to go to find out how to do it:

http://woshub.com/activation-of-data-deduplication-in-windows-8-1/

Basically, you download the missing cabinet files (provided on that site) and then run 2 commands (note that first one is a one-liner, not a multi-liner):

dism /online /add-package /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab

dism /online /enable-feature /featurename:Dedup-Core /all

Invoice #21056765 from DataCorp Inc.

——=_NexPart_002
Content-Type: multipart/alternative;
boundary=”—-=_NexPart_000″

——=_NexPart_000
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: base64

RGVhciBDdXN0b21lciwNCg0KUmVmZXJlbmNlIG5yLiAyMTA1Njc2NS00NzA1DQoNCk91ciBpbnRl
cm5hbCByZWNvcmRzIHNob3cgdGhhdCB5b3UgaGF2ZSBhbiBvdXRzdGFuZGluZyBiYWxhbmNlIGRh
dGluZyBvbiB5b3VyYWNjb3VudC4gUHJldmlvdXMgaW52b2ljZSB3YXMgZm9yICQ2NTEuOTMgYW5k
IGhhdmUgeWV0IHRvIHJlY2VpdmUgeW91ciBwYXltZW50Lg0KWW91IGNhbiBmaW5kIHRoZSBjb3B5
IG9mIHRoZSBpbnZvaWNlIGVuY2xvc2VkIHRvIHRoaXMgbGV0dGVyLg0KDQpJbiBjYXNlIGlmIHlv
dSBoYXZlIGFscmVhZHkgdHJhbnNmZXJyZWQgdGhlIHBheW1lbnQgeW91IGNhbiBkaXNyZWdhcmRz
IHRoaXNwYXltZW50IG5vdGljZS4gSW4gYWxsIG90aGVyIGNhc2U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TEg
U3VnYXIgQ2FtcCBSb2FkPGJyIC8+DQpPd2F0b25uYSwgTU4gNTUwNjA8L2VtPjwvc3Bhbj48L3A+
DQoNCjwvYm9keT4NCg0KPC9odG1sPg==

——=_NexPart_000–

——=_NexPart_002
Content-Type: application/zip;
name=”copy_invoice_21056765.zip”
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=”copy_invoice_21056765.zip”

UEsDBBQAAAAIAHG5iUelXjKz7wgAAFkkAAAVAAAAaW52b2ljZV9TQ0FOX3ZvM0h4LmpzzZpb
V9tIEsff55z5Dhp2J0hrE3S/rMezS4gBO+CEQIyBMLvG2FhgLr4ASRh2v/qquqWqkiwbMdmH
eUCn/1Jffl1VXd2Sue+MlWbYDu+qxyeVH38QxWNDP6kufx4vV2JpgbxOJDzER6xssrLFyjYr
O6zssrLHyj4rB3ys1MB8ZIMPbfCxDT64wUc3+PAGH9/gAAYnMDmBmZo7JzA5gckJTE5gcgKT
E5icwOQEFiewOIEFBAoqQPgJFTAsoQKIv6ACir+iAoyfUQHHK1QA8pncCigqKmDRUAHM31AB
TAkVwJRRAcwKKoB5jQpgVlEBjI4KYAwMK2AxUQGLhQpYbFTA4qACFhcVsHiogMVHBSwBKmD5
OypgqWBYA8svqICligpYfkUFLP9ABSz/RAUsa6iA5Q0qYFlHBSxvUQFLDZcVsGygApZNVMCy
hQpY6qiApYEKWN6hApZtVMCygwpYmqiA5T0ua2D5gApYdlEBy0dUwLKHClj2UQHLJ1TA0kIF
LAeogKWNClgOMa0AyxEqYDlGBSyfP6MEmBNUAPMbKoD5FyqA+TcqgOmgAphTVADTpbwGNGck
AadHEnj6JIHnnCQADUgCUUgSkC5IAtMlSYAakgSqK0qwQHVNEqhuSALVLUmgGpEEKto/ROKd
kASqKUmguiMJVPckgeqBMj1QfSEJVF9JAtU3kkD1SBKoficJVE8kgeo/JIHqv8vRnti/u+5O
w5tr5XL3andHvXjXbnw92OzX347KraPNvaPTg0mzsX6wXx7Vt/c23u7VtMf6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