nc -zv 127.0.0.1 80
Multiple ports:
nc -zv 127.0.0.1 22 80 8080
Range of ports:
nc -zv 127.0.0.1 20-30
http://superuser.com/questions/621870/test-if-a-port-on-a-remote-system-is-reachable-without-telnet
I am Wen from Sydney Australia and has been working on Sitecore from 2010. It is my tech blog/notes about Sitecore. It could be short or long, awesome or plain. Hope we can all learn something here.
nc -zv 127.0.0.1 80
nc -zv 127.0.0.1 22 80 8080
nc -zv 127.0.0.1 20-30
http://superuser.com/questions/621870/test-if-a-port-on-a-remote-system-is-reachable-without-telnet
bin
directory of your Bamboo installation directory.tomcat7w //ES//%SERVICENAME% |
tomcat7w //ES//Bamboo
Java
tab to see the list of current start-up options:public string GetAccessToken() { const string consumerKey = "{yourkey}"; const string consumerSecret = "{secret}"; string url =string.Format("https://api.telstra.com/v1/oauth/token?client_id={0}&client_secret={1}&grant_type=client_credentials&scope=SMS", consumerKey, consumerSecret); using (var webClient = new System.Net.WebClient()) { var json = webClient.DownloadString(url); var obj = JObject.Parse(json); return obj.GetValue("access_token").ToString(); } }
public string SendSms(string token, string recipientNumber, string message) { try { using (var webClient = new System.Net.WebClient()) { webClient.Headers.Clear(); webClient.Headers.Add(HttpRequestHeader.ContentType, @"application/json"); webClient.Headers.Add(HttpRequestHeader.Authorization, "Bearer " + token); string data = "{\"to\":\"" + recipientNumber + "\", \"body\":\"" + message + "\"}"; var response = webClient.UploadData("https://api.telstra.com/v1/sms/messages", "POST", Encoding.Default.GetBytes(data)); var responseString = Encoding.Default.GetString(response); var obj = JObject.Parse(responseString); return obj.GetValue("messageId").ToString(); // Now parse with JSON.Net } } catch (Exception e) { Console.WriteLine(e.Message); } return string.Empty; }
/etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
# wheezy-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ wheezy-updates main
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main
apt-get update
apt-get install debian-archive-keyring
apt-get install apt dpkg aptitude
apt-get dist-upgrade
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
apt-get update
root@debian-x64:~# apt-get update Ign http://58.162.66.11 squeeze Release.gpg Ign http://58.162.66.11/linux/debian-6.0.1a-x64/ squeeze/main Translation-en Ign http://58.162.66.11/linux/debian-6.0.1a-x64/ squeeze/main Translation-en_AU Hit http://58.162.66.11 squeeze Release Ign http://58.162.66.11 squeeze/main Sources/DiffIndex Ign http://58.162.66.11 squeeze/main amd64 Packages/DiffIndex Hit http://58.162.66.11 squeeze/main Sources Ign http://58.162.66.11 squeeze/main amd64 Packages Hit http://58.162.66.11 squeeze/main amd64 Packages Ign http://repo.mongodb.org squeeze/mongodb-org/3.0 Release.gpg Ign http://repo.mongodb.org/apt/debian/ squeeze/mongodb-org/3.0/main Translation-en Ign http://repo.mongodb.org/apt/debian/ squeeze/mongodb-org/3.0/main Translation-en_AU Ign http://repo.mongodb.org squeeze/mongodb-org/3.0 Release Ign http://repo.mongodb.org squeeze/mongodb-org/3.0/main amd64 Packages Err http://repo.mongodb.org squeeze/mongodb-org/3.0/main amd64 Packages 404 Not Found Get:1 http://ftp.au.debian.org squeeze-updates Release.gpg [836 B] Hit http://security.debian.org squeeze/updates Release.gpg Ign http://security.debian.org/ squeeze/updates/main Translation-en Ign http://security.debian.org/ squeeze/updates/main Translation-en_AU Ign http://ftp.au.debian.org/debian/ squeeze-updates/main Translation-en Ign http://ftp.au.debian.org/debian/ squeeze-updates/main Translation-en_AU Hit http://security.debian.org squeeze/updates Release Hit http://security.debian.org squeeze/updates/main Sources Hit http://security.debian.org squeeze/updates/main amd64 Packages Get:2 http://ftp.au.debian.org squeeze-updates Release [113 kB] Err http://ftp.au.debian.org squeeze-updates Release Fetched 837 B in 5s (158 B/s) Reading package lists... Done W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.au.debian.org squeeze-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 W: Failed to fetch http://repo.mongodb.org/apt/debian/dists/squeeze/mongodb-org/3.0/main/binary-amd64/Packages.gz 404 Not Found W: Failed to fetch http://ftp.au.debian.org/debian/dists/squeeze-updates/Release W: Some index files failed to download, they have been ignored, or old ones used instead. |
---|
gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553gpg -a --export 8B48AD6246925553 | apt-key add -
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8locale-gen en_US.UTF-8
dpkg-reconfigure locales
sudo apt-get install -y mongodb-org
3.0.2 mongodb-org-server=3.0.2 mongodb-org-shell=3.0.2 mongodb-org-mongos=3.0.2 mongodb-org-tools=3.0.2
If we get this error as below, go to [FAIL] Starting database: mongod failed!
invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mongodb-org-mongos (3.0.2) ...
Setting up mongodb-org-tools (3.0.2) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing mongodb-org (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
|
---|
public class CustomAnalyzer : Lucene.Net.Analysis.Standard.StandardAnalyzer { private static ISetSTOP_WORDS_SET = GetStopWords();//{{"by","by"}}; <-- Makes "by" a public CustomAnalyzer() : base(Lucene.Net.Util.Version.LUCENE_30, STOP_WORDS_SET) { } private static ISet GetStopWords() { string[] strArray = GetWords(); CharArraySet set = new CharArraySet(strArray.Length, false); set.AddAll((IEnumerable )strArray); return (ISet )CharArraySet.UnmodifiableSet(set); } }
Lucene_30
ManagedPoolThread #16 18:39:46 ERROR EmailCampaign: Error on Initializating CPUAvgPerformance with exception: System.UnauthorizedAccessException: Access to the registry key 'Global' is denied. at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity) at Microsoft.Win32.RegistryKey.GetValue(String name) at System.Diagnostics.PerformanceMonitor.GetData(String item) at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item) at System.Diagnostics.PerformanceCounterLib.get_CategoryTable() at System.Diagnostics.PerformanceCounterLib.CounterExists(String category, String counter, Boolean& categoryExists) at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter) at System.Diagnostics.PerformanceCounter.InitializeImpl() at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly) at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName) at Sitecore.Modules.EmailCampaign.Core.Dispatch.CpuAvgPerformance..ctor() at Sitecore.Modules.EmailCampaign.Core.Dispatch.TimeSummary..ctor()
1st place |
2nd place |
public class CustomDeleteItems : ItemOperation { public void Reload(ClientPipelineArgs args) { SheerResponse.Eval("window.parent.location.reload();"); } }
public class CustomDelete : WebEditCommand { ////// Executes the command in the specified context. /// /// /// The context. public override void Execute(CommandContext context) { Assert.ArgumentNotNull((object)context, "context"); NameValueCollection parameters = new NameValueCollection(); parameters["id"] = context.Parameters["id"]; Context.ClientPage.Start((object)this, "Run", parameters); } ////// Queries the state of the command. /// /// /// The context. /// ////// The state of the command. /// /// public override CommandState QueryState(CommandContext context) { Assert.ArgumentNotNull((object)context, "context"); SiteContext site = Context.Site; bool flag = false; if (site != null && Context.PageMode.IsPageEditorEditing) flag = true; if (!flag && WebUtil.GetQueryString("mode") != "edit") return CommandState.Disabled; Item obj = context.Items.Length > 0 ? context.Items[0] : (Item)null; if (obj == null || !obj.Access.CanDelete() || obj.Appearance.ReadOnly) return CommandState.Disabled; return base.QueryState(context); } ////// Runs the pipeline. /// /// /// The arguments. protected void Run(ClientPipelineArgs args) { Assert.ArgumentNotNull((object)args, "args"); Item obj = Client.ContentDatabase.GetItem(args.Parameters["id"]); if (obj != null) { if (WebEditCommand.IsStartItem(obj)) { SheerResponse.Alert("The operation cannot be applied to the site start item."); } else { if (!SheerResponse.CheckModified()) return; Start("uiDeleteItems", args, obj.Database, new Item[1] { obj }, new NameValueCollection())["message"] = "item:deleted(id=" + (object)obj.ID + ")"; } } else SheerResponse.Alert("The item could not be found.\n\nYou may not have read access or it may have been deleted by another user."); } private static NameValueCollection Start(string pipelineName, ClientPipelineArgs args, Database database, Item[] items, NameValueCollection additionalParameters) { Assert.ArgumentNotNull((object)pipelineName, "pipelineName"); Assert.ArgumentNotNull((object)args, "args"); Assert.ArgumentNotNull((object)database, "database"); Assert.ArgumentNotNull((object)items, "items"); Assert.ArgumentNotNullOrEmpty(pipelineName, "pipelineName"); NameValueCollection nameValueCollection = new NameValueCollection(); string str1 = string.Join("|", Enumerable.Select - ((IEnumerable
- )items, (Func
- )(item => item.ID))); string str2 = items[0].Language.ToString(); nameValueCollection.Add("database", database.Name); nameValueCollection.Add("items", str1); nameValueCollection.Add("language", str2); nameValueCollection.Add("ispageediting","1"); args.Parameters = nameValueCollection; if (additionalParameters != null) { foreach (string index in additionalParameters.AllKeys) args.Parameters[index] = additionalParameters[index]; } Context.ClientPage.Start(pipelineName, args); return nameValueCollection; } }
public class CustomDeleteItems : ItemOperation { ////// Executes Pipeline Postaction. /// /// /// The arguments. /// public void Reload(ClientPipelineArgs args) { //Sitecore.Client.ContentDatabase.. if (args.Parameters["ispageediting"] == "1") { SheerResponse.Eval("window.parent.location.reload();"); } } }
I have setup a standard form using WFFM in Sitecore 8.2. It always fail when submit. Error as below, Error: Exception: System.Data.DataE...