View whoami.cmd
nslookup -type=txt o-o.myaddr.l.google.com. ns1.google.com.
View stuns
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
View checkHeaderPDF.cs
//http://stackoverflow.com/a/3257743/84852
public bool IsPDFHeader(string fileName)
{
byte[] buffer = null;
FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
long numBytes = new FileInfo(fileName).Length;
//buffer = br.ReadBytes((int)numBytes);
buffer = br.ReadBytes(5);
View install_package.ps1
Install-Package NLog -Version 4.1.0 -Project ProjectName
View ReplaceString.cs
//// http://stackoverflow.com/a/244933/84852
public static string ReplaceString(string str, string oldValue, string newValue, StringComparison comparison)
{
if (string.IsNullOrEmpty(oldValue))
{
throw new ArgumentNullException("oldValue");
}
StringBuilder sb = new StringBuilder();
View child_window.html
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Open</button>
<button onclick="gotoUrl()">goto</button>
View promise_test_01.js
(function() {
var obj = (function() {
var promise = null;
var getPromise = function() {
wl('getPromise');
if (!promise) {
View gist:ac4ff363bb1c6395da111231ce1dc106
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
View window_test.html
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Open</button>
<button onclick="gotoUrl()">goto</button>
View references.ps1
# Script by Danny Tuppeny
# http://blog.dantup.com/2012/05/free-dependency-graph-generation-using-powershell-and-yuml/
function Get-ProjectReferences
{
param(
[Parameter(Mandatory)]
[string]$rootFolder,
[string[]]$excludeProjectsContaining
)