Bunny's Code Burrow

this is a JS world


  • Home

  • About

  • Archives

  • Tags

  • Search

connect Ubuntu from SecureCRT

Posted on 2019-09-19

How to connect to Ubuntu from SecureCRT

  1. Login to Ubuntu from under root
  2. apt-get install openssh-server
  3. service ssh restart
  4. ifconfig
  5. If “ifconfig” is not wokring , apt-get install net-tools
  6. inet addr stands for IP
  7. Go back to windows cmd, ping this IP
  8. Go to SecureCRT,delete the previous one if won’t use it anymore, new a session under ssh2, input the username ,password,and IP of ubuntu.

Enjoy

Set up SSL

Posted on 2019-09-19

SET UP SSL FOR NOPCOMMERCE AND WORDPRESS

In order to update for all these websites, first ,we need to ask the host to update the SSL from the server side.

Then, for WordPress, it would be much easier.

However, for Nopcommerce, the setting is different as below:
Go to the Administration->Configuration->Stores->Edit

Update the Store URL with HTTPS

Then enable the SSL

Finally, go to General And Miscellaneous Settings,under the tab of Security settings, click the Force SSL for all site pages

Hello World

Posted on 2019-02-13

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

how to bulkly add hyperlinks to Excel

Posted on 2018-08-16

How to bulky add hyperlinks to Excel

Here is an example of how to work effectively with Excel.
The situation is after merge two columns in Excel, the final column become a link whick like: http://www.microanalytix.co.nz/3ml-luer-lock-sterile-syringe.

However, these links are not hyperlink. Then the following step will let you know how to convert them into hyperlinks

  1. Alt+F11
  2. click view and code
  3. Copy the folllowing code into the new open window as below:

    Sub ActiveHyperlinks()
    
    For Each C In [A2]
    
    ActiveSheet.Hyperlinks.Add C, C.Value
    
    Next
    
    End Sub 
    

    You could change A2 according to your requirements, for example, if you want to change A2 to A20, just modify it as [A2:A20].

  4. The last step is simple and easy, click run->Run Sub/UserForm.
  5. Then you would find the result in your original Excel.

how to define problem with wordpress

Posted on 2018-07-31

How to define the problem with WordPress

It seems something wrong with the website that I could not visit it,but I could visit the backend of the website.
Here is my solution as below:

  1. Access to FTP
  2. Go to logs
  3. logs/php_errors
  4. The error shows something wrong with my child theme.
  5. I tested to install another theme which works fine.
  6. Then I noticed somehow the Parent theme of my child theme is missing, so I installed the parent one.
  7. All good now.

how to modify novi slider for nopcommerce in source code

Posted on 2018-06-12

How to modify novi slider for nopCommerce in source code

  1. You have to edit the source code -

    \Plugins\Nop.Plugin.Widgets.NivoSlider\Views\WidgetsNivoSlider\PublicInfo.cshtml file
    
  2. Open the solution in Visual Studio

  3. Modify required files
  4. Re-build the solution
  5. Back up the previous code
  6. Upload modified libraries/files. In your case copy

    \Presentation\Nop.Web\Plugins\Widgets.NivoSlider\Nop.Plugin.Widgets.NivoSlider.dll
    

    to your

    \Plugins\Widgets.NivoSlider\Nop.Plugin.Widgets.NivoSlider.dll
    
  7. Restart the application

how to resize the nivoslider for nopCommerce

Posted on 2018-06-12

How to resize the nivoslider for nopCommerce

The best way to handle this is to edit the width and height of the actual slider. Edit the nivo-slider.css located in Plugins/Widgets.NivoSlider/Content/nivoslider/. Just edit the width & height in the first section:

.nivoSlider {
  position:relative;
  width:100%;
  height:auto;
  overflow: hidden;
}

update search box placeholder

Posted on 2018-06-12

How to update placeholder for searchbox

To change the placeholder text in the search bar, go to Admin panel==>Configuration==>Language==> choose the language you’re using and change its string resource.

The resource name for search is ‘search.searchbox.tooltip’. Similarly, you can change any label throughout the site without changing source code.

Try to make full use of Language, you will enjoy more from nopCommerce.

nopcommerce new window

Posted on 2018-06-07

How to open new page in new windows for nopCommerce

The file is _Root.Head.cshtml, the path is Nop.Web/View/Shared/ _Root.Head.cshtml, add before as below:

@using Nop.Core
@using Nop.Core.Domain.Common;
@using Nop.Core.Infrastructure;
@{
var displayMiniProfiler = CommonHelper.GetTrustLevel() >= AspNetHostingPermissionLevel.High &&
    EngineContext.Current.Resolve<Nop.Core.Domain.StoreInformationSettings>().DisplayMiniProfilerInPublicStore;

//resources
Html.AppendCssFileParts("~/Content/jquery-ui-themes/smoothness/jquery-ui-1.10.3.custom.min.css");

Html.AppendScriptParts("~/Scripts/public.ajaxcart.js");
Html.AppendScriptParts("~/Scripts/public.common.js");
Html.AppendScriptParts("~/Scripts/jquery-migrate-1.2.1.min.js");
Html.AppendScriptParts("~/Scripts/jquery-ui-1.10.3.custom.min.js");
Html.AppendScriptParts("~/Scripts/jquery.validate.unobtrusive.min.js");
Html.AppendScriptParts("~/Scripts/jquery.validate.min.js");
Html.AppendScriptParts("~/Scripts/jquery-1.10.2.min.js");
//add pupop
Html.AppendScriptParts("~/Scripts/pupopTip.js");

//X-UA-Compatible tag
var commonSettings = EngineContext.Current.Resolve<CommonSettings>();
if (commonSettings.RenderXuaCompatible)
{
    Html.AppendHeadCustomParts(string.Format("<meta http-equiv=\"X-UA-Compatible\" content=\"{0}\"/>", commonSettings.XuaCompatibleValue));
}
}
<!DOCTYPE html>
<html @Html.Partial("LanguageAttributes")>
<head>
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-MT3JMK');</script>
    <!-- End Google Tag Manager -->
<title>@Html.NopTitle(true)</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta name="description" content="@(Html.NopMetaDescription())" />
<meta name="keywords" content="@(Html.NopMetaKeywords())" />
<meta name="generator" content="nopCommerce" />
<meta name="google-site-verification" content="YcdHXMIdUFkSueRbht63U4qY-BRV4JiU_p3otFwEd50" />
@Html.NopHeadCustom()
@*This is used so that themes can inject content into the header*@
@Html.Partial("Head")
@Html.Widget("head_html_tag")
@Html.NopCssFiles(this.Url, ResourceLocation.Head)
@Html.NopScripts(this.Url, ResourceLocation.Head)
@Html.NopCanonicalUrls()
@Html.Action("RssHeaderLink", "News")
@Html.Action("RssHeaderLink", "Blog")
@*Favicon - upload favicon.ico file to the root directory*@
@Html.Action("Favicon", "Common")
@if (displayMiniProfiler)
{
    @StackExchange.Profiling.MiniProfiler.RenderIncludes()
}
<!--Powered by nopCommerce - http://www.nopCommerce.com-->
<!--Copyright (c) 2008-2013-->
<base target="_blank">
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MT3JMK"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
@RenderBody()
@Html.NopCssFiles(this.Url, ResourceLocation.Foot)
@Html.NopScripts(this.Url, ResourceLocation.Foot)
</body>
</html>

update hexo with shh

Posted on 2018-02-23

fatal: could not read Username for ‘https://github.com‘: Invalid argument

Hexo g -d

but get the error like below

fatal: could not read Username for 'https://github.com': Invalid argument
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument

The way to solve it is by two steps
1.go to the blog/_config.yml update the url like

deploy:
type: git
repo: git@github.com:zengyanzi/zengyanzi.github.io.git
branch: master

Instead of https://github.com/zengyanzi/zengyanzi.github.io

  1. Generate ssh as below :

A- Create a ssh key using Git Bash using following command

ssh-keygen -t rsa -b 4096 -C "zengzhen.ucf@email.com"

After running this command just install the by default options and enter the password balnk when it prompts.(Three times of pressing space)

B- Then run the following commands to locate the public/private key generated from step1

cd .ssh

cd ~/.ssh

3- Then run the following command to view your public:

cat id_rsa.pub

4- Copy your public key and go to your GitHub account -> settings -> create a SSH and GPG keys then click new ssh key and past your public key in the in key text field.

5- Verify your public key using Git Bash by running the following command:

ssh -vT git@github.com

You will get output like this

debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3848, received 2040 bytes, in 0.2 seconds
Bytes per second: sent 16032.4, received 8499.5
debug1: Exit status 1

Then you no longer got “could not read Username for ‘https://github.com‘: Invalid argument”

1…789…16
Jenny Zeng

Jenny Zeng

Loving code ,especially javascript, React Native

155 posts
37 tags
GitHub Linkedin
© 2020 Jenny Zeng
Powered by Hexo
Theme - NexT.Pisces