Yahoo Archive Decode

Yahoo Messenger is a chat client using an existing Yahoo Mail account for
logging in. It provides a lot of interesting features, such as: voice chat,
webcam, conference… One of these features is allow the user to store their
chat text and view them again in future.
– To active this archive feature, go to Messenger -> Preferences ( Ctrl+Shift+P)
– Under Category, choose Archive -> Yes, save all of my messages and you
activated the archive feature.
– After activating archive, you can view the archive through Contacts -> Message Archive.
http://hintdesk.com/Web/Tut/Reverse/Crypto/Yahoo Archive Decode.zip

ASP.Net Development Server – Page cannot be displayed

Yesterday I would like to install Siverlight add-on to Visual Studio 2008 to make some Silverlight application. The installation of the Add-on worked perfectly. I had no errors or something like that. When I created a blank Silverlight, compiled it, and opened it in a browser to see if it works… then a stupid error comes. In IE it is “Page cannot be displayed” and in FF “Firefox can’t establish a connection to the server”.

Continue reading ASP.Net Development Server – Page cannot be displayed

Sitecore 9 Certification Training

1. How does Sitecore define a type of item (the data schema)?

Sitecore defines data schemas with templates. These define fields, field type, and field sections that describe a type of item. The use of items – and thereby the template on which they are based – helps determines the governance model around them.
https://helix.sitecore.net/principles/templates/index.html

2. Why do we set icons on our template?

Giving your templates an icon ensures that you easily differentiate between different types of items.

3. What is the default base template for all templates?

Standard template under Templates/System/Templates/Standard template

4. How do we make our changes appear on the live website?

Publish Site. When you are ready to publish your website, you can run the publishing wizard, which guides you through the steps of publishing in Sitecore. You can run the publishing wizard from the Content Editor and the Sitecore Desktop.
https://doc.sitecore.net/sitecore_experience_platform/content_authoring/publishing/publish_a_website

5. What is Experience Management (xManagement)?

Experience Management (CMS-only mode) allows you to run Sitecore XP without the Experience Database (xDB) enabled or purchasing xDB licenses. With Experience Management, you can use Sitecore to create, manage, and publish content to your websites.
https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/experience_management/experience_management_an_overview

6. What is the preferred way to modify the web.config?

Use Notepad? For overwriting the Sitecore settings, use patch and set in your own .config files.
https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/customizing_server_configuration/configuration_patch_file_examples

7. What is stored in a Sitecore package?

A Sitecore package contains the following folders:
– installer: project + version
– items: XML serialized file of the item stored exactly by path and by the currently selected database (master or web)
– metadata: .txt files of the author, comment, license…
– properties: all properties of items serialized in XML

8. What item setting needs to be specified for authors to be able to add content?

Template, fields and insert options

9. Where are default field values defined?

Standard Values template

10. What is the difference between Shared and Unversioned fields?

– The data in the Shared fields are shared among all languages and all numbered versions. So if you make a change in one language version of an item it would reflect in other languages and their numbered versions. These type of fields are used mainly if there is some data whose value need not to b versioned at all. Like a profile image or something
– The data in the Unversioned fields are separate for each language version but all the numbered versions share the same data. Select this type of field if you need to maintain different data for different languages but do not need numbered versions. As a product name field, as it could be different in different languages and you might have decided not to maintain numbered versions.

11. What is the recommended practice for setting Insert Options?

Always set Insert Options on the Standard Values template.

12. What setting determines whether or not an item can be viewed in the browser?

The Layout setting.

13. What is the scaffolding of your presentation?

/sitecore/layout

14. How do you register a layout with Sitecore?

Set Presentation Details on a template’s Standard Values

15. What is the main DLL for developing in Sitecore?

Sitecore.Kernel.dll

My online notes – Section 0008

Note 1: Remove diacritics (special characters) from string

private static string RemoveDiacritics(string text)
{
	string textNormalized = text.Normalize(NormalizationForm.FormD);
	StringBuilder stringBuilder = new StringBuilder();

	for (int index = 0; index < textNormalized.Length; index++)
	{
		UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(textNormalized[index]);
		if (uc != UnicodeCategory.NonSpacingMark)
		{
			stringBuilder.Append(textNormalized[index]);
		}
	}

	return (stringBuilder.ToString().Normalize(NormalizationForm.FormC));
}

Continue reading My online notes – Section 0008

MySql console – Most used commands

1. Login

mysql -u USERNAME -p

At the Enter Password prompt, type your password. When you type the correct password, the mysql> prompt appears.

2. List all databases

show databases;

3. Access a specific database

use DBNAME

4. List all tables

show tables;

5. The path to root config file

/etc/mysql/conf.d/my.cnf

6. Create user

To create a database user, type the following command. Replace username with the user you want to create, and replace password with the user’s password:

grant all privileges on *.* to 'user_name'@'localhost' identified by 'password';

For remote connection use % for domain name

 grant all privileges on *.* to 'user_name'@'%' identified by 'password';

7. Create and restore backup from mysqldump

mysqldump -u user_name -p database_name > /tmp/dump.sql
mysql -u user_name -p database_name < /tmp/dump.sql

8. Allow remote connection

Edit the config file /etc/mysql/conf.d/my.cnf by commenting the bind_address

#bind-address           = 127.0.0.1

Then restart mysql server

/etc/init.d/mysql restart

Then open the port 3306 on the machine

sudo iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT

And test if from the remote computer

nc -z -v ip_address 3306

How to add subdomain in nginx server?

Follow these following steps to add a subdomain within Nginx server.

1. In the domain panel, add an A-record to point the new subdomain to your server

2. Register the new subdomain with Nginx server

sudo nano /etc/nginx/sites-available/youtube.hintdesk.com

3. Use this simple configuration for the newly created file

server {
        listen 80;

        root /var/www/html/apps/youtube;
        index index.html index.htm index.nginx-debian.html;

        server_name youtube.hintdesk.com www.youtube.hintdesk.com;

        location / {
                try_files $uri $uri/ /index.html?$args;
        }
}

4. To enable the configuration, make a symlink to the enabled sites

ln -s /etc/nginx/sites-available/youtube.hintdesk.com /etc/nginx/sites-enabled/youtube.hintdesk.com

5. The last thing to do is restart Nginx:

service nginx restart

6. If we activate SSL for our domain and receive the error ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY on Chrome. Then edit the ssl.conf with following settings

sudo nano /var/www/tetxua.com/conf/nginx/ssl.conf

And add following lines

ssl_ciphers "ECDHE+AES128:RSA+AES128:ECDHE+AES256:RSA+AES256:ECDHE+3DES:RSA+3DES";

Which is recommended by Cloudflare.

My online notes – Section 0006

Note 1: Sony Ericsson PC Suite for Z610i
http://www.megaupload.com/?d=V7II5C41

Note 2: Set autostart for program

private Boolean SchreibeinAutostart( String dateipfad )
{
    try
    {
        String samAccountName;
        {
            var currentWindowsIdentity = WindowsIdentity.GetCurrent( );
            if ( currentWindowsIdentity == null )
            {
                return false;
            }

            samAccountName = currentWindowsIdentity.Name;
        }

        var registrySecurity = new RegistrySecurity( );
        {
            registrySecurity.AddAccessRule( new RegistryAccessRule( samAccountName,
                    RegistryRights.WriteKey | RegistryRights.ChangePermissions, InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow ) );
        }

        var targetRegistryKey = Registry.CurrentUser.CreateSubKey( "Software\\Microsoft\\Windows\\CurrentVersion\\Run\\" );

        if ( targetRegistryKey == null )
        {
            return false;
        }

        targetRegistryKey.SetValue( dateipfad.Remove( 0, dateipfad.LastIndexOf( @"\" ) + 1 ), dateipfad );

    }
    catch ( Exception )
    {
        return false;
    }

    return true;
}

Continue reading My online notes – Section 0006

My online notes – Section 0005

Note 1: Impersonation for accessing network path

private void ApplyUserCredentials(string Share, string Domain, string Username, string Password)
{
	USE_INFO_2 useInfo = new USE_INFO_2();
	useInfo.ui2_local = string.Empty;
	useInfo.ui2_remote = Share;
	useInfo.ui2_password = Password;
	useInfo.ui2_asg_type = 0;    //disk drive
	useInfo.ui2_usecount = 1;
	useInfo.ui2_username = Username;
	useInfo.ui2_domainname = Domain;
	uint paramErrorIndex;

	uint returnCode = NetUseAdd(null, 2, ref useInfo, out paramErrorIndex);
	if (returnCode != 0)
	{
		throw new Win32Exception((int)returnCode);
	}
}

[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern UInt32 NetUseAdd(string UncServerName,UInt32 Level, ref USE_INFO_2 Buf,  out UInt32 ParmError);

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
private struct USE_INFO_2
{
	internal string ui2_local;
	internal string ui2_remote;
	internal string ui2_password;
	internal UInt32 ui2_status;
	internal UInt32 ui2_asg_type;
	internal UInt32 ui2_refcount;
	internal UInt32 ui2_usecount;
	internal string ui2_username;
	internal string ui2_domainname;
}

Continue reading My online notes – Section 0005

My online notes – Section 0004

Note 1: Proxy of HttpWebRequest for uploading

HttpWebRequest HttpRequest = (HttpWebRequest)WebRequest.Create(this.fullUrl);
<system.net>
    <defaultProxy enabled ="false">
		<proxy autoDetect ="True"/>
    </defaultProxy>
</system.net>

Note 2: Walkthrough: Implementing Virtual Mode in the Windows Forms DataGridView Control for page loading
http://msdn.microsoft.com/en-us/library/15a31akc.aspx

Continue reading My online notes – Section 0004