Author Archives: admin

Tips for Coding Email Preheaders

Hidden preheader text

here are a lot of designs that just won’t accommodate visible preheader text, or it become undesirable for branding reasons. If you’d like to add hidden preheader text to your email, don’t worry, it’s not hard!
To begin with, you’ll want to pick a place where the preheader text won’t cause issues in your layout. Usually the text will take up, at most, one pixel of vertical space, but in some cases this can bump down content. If you’re putting the preheader text into an existing header, you may want to give it a row to itself, so that if any content below is moved, it will all be moved the same amount.
To hide the text, you’ll want to include the following inline styles:


<td style="display:none !important; visibility:hidden; mso-hide:all; font-size:1px; color:#ffffff; line-height:1px; max-height:0px; max-width:0px; opacity:0; overflow:hidden;">
  This is preheader text.            
</td>

As you can see, I have hidden the text in a multitude of ways. Many of these are fallbacks for clients that don’t recognize or play nicely with some of the other styles in the list.

One tip from my own personal experience: Don’t put placeholder text here! You may want to add placeholder text for testing, but make sure to remove it after. The last thing you want is for an email to go out with “This is preheader text” as the actual preheader text… unless you are intentionally making a “This is Spinal Tap” reference. It’s much better to have an email go out with no preheader text than with placeholder text.

Preheader character limits

Just how much preheader text should you include? We recommend 50-100 characters. Though some clients are capable of showing more than this, it’s usually only under special circumstances (like a very wide browser window). Check out this chart to see the limits of some popular email clients.

Preheader Character Limits

Email Client Limit
iPhone (5S) 64
Gmail (Web Client) 100
Gmail (iOS Client, 5S) 34
iPad 5, Mail App 64
Android 4.4 97
Apple Mail 8 50-100
Outlook 2013 60-100
Outlook.com 124-236
Yahoo! Mail 135-202

source:

Tips for Coding Email Preheaders

The page was not displayed because the request entity is too large. iis7

“The page was not displayed because the request entity is too large.”

 

I think this will fix the issue IF you have SSL enabled:

Setting uploadReadAheadSize in applicationHost.config file on IIS7.5 would resolve your issue in both cases. You can modify this value directly in applicationhost.config.

1) Select the site under Default Web Site

2) Select Configuration Editor

3) Within Section Dropdown, select “system.webServer/serverRuntime”

4) Enter a higher value for “uploadReadAheadSize” such as 1048576 bytes. Default is 49152 bytes.

During client renegotiation process, the request entity body must be preloaded using SSL preload. SSL preload will use the value of the UploadReadAheadSize metabase property, which is used for ISAPI extensions

Reference: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/7e0d74d3-ca01-4d36-8ac7-6b2ca03fd383.mspx?mfr=true

 

DBCC SHRINKFILE (Transact-SQL)

A. Shrinking a data file to a specified target size

The following example shrinks the size of a data file named DataFile1 in the UserDB user database to 7 MB.


USE UserDB;
GO
DBCC SHRINKFILE (DataFile1, 7);
GO

B. Shrinking a log file to a specified target size

The following example shrinks the log file in the AdventureWorks database to 1 MB. To allow the DBCC SHRINKFILE command to shrink the file, the file is first truncated by setting the database recovery model to SIMPLE.


USE AdventureWorks2012;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE AdventureWorks2012
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (AdventureWorks2012_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE AdventureWorks2012
SET RECOVERY FULL;
GO

C. Truncating a data file

The following example truncates the primary data file in the AdventureWorks database. The sys.database_files catalog view is queried to obtain the file_id of the data file.


&nbsp;

USE AdventureWorks2012;
GO
SELECT file_id, name
FROM sys.database_files;
GO
DBCC SHRINKFILE (1, TRUNCATEONLY);

D. Emptying a file

The following example demonstrates the procedure for emptying a file so that it can be removed from the database. For the purposes of this example, a data file is first created and it is assumed that the file contains data.


USE AdventureWorks2012;
GO
-- Create a data file and assume it contains data.
ALTER DATABASE AdventureWorks2012
ADD FILE (
NAME = Test1data,
FILENAME = 'C:\t1data.ndf',
SIZE = 5MB
);
GO
-- Empty the data file.
DBCC SHRINKFILE (Test1data, EMPTYFILE);
GO
-- Remove the data file from the database.
ALTER DATABASE AdventureWorks2012
REMOVE FILE Test1data;
GO

https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql

Windows Domain and NTP Servers

Find your PDC Emulator

Get-ADDomainController -Discover -Service PrimaryDC

Transfer domain roles if needed

https://technet.microsoft.com/pt-pt/library/cc816944(v=ws.10).aspx

ntp Servers Pt

http://www.pool.ntp.org/zone/pt
pool.ntp.org

Set NTP

https://blogs.technet.microsoft.com/nepapfe/2013/03/01/its-simple-time-configuration-in-active-directory/

Using w32tm.exe

Run the following command on the PDC emulator:

w32tm /config /manualpeerlist:timeserver /syncfromflags:manual /reliable:yes /update

(where timeserver is a –space delimited– list of your time source servers)

Once done, restart W32Time service.

net stop w32time
net start w32time

Run the following command on all other DCs (that are not PDC):

w32tm /config /syncfromflags:domhier /update

Once done, restart W32Time service.

FIND DC’servers

PS   nltest /dclist:mydomain.local

 

Configurar o NTP no Linux

NTP – Sincronize o relógio do seu Linux

1- Vamos começar por instalar o ntp

yum install ntp

2- Agora activamos o serviço

chkconfig ntpd on

Indicação do servidor a usar para sincronizar o nosso relógio. Para esse vou usar um dos disponibilizados pelo Observatório Astronómico de Lisboa

ntpdate ntp02.oal.ul.pt

Nota: O Observatório Astronómico de Lisboa disponibiliza 2 servidores para configuração dos relógios. Quem pretender usar os dois deve editar o ficheiro /etc/ntp.conf e incluir a seguinte informação:

server ntp02.oal.ul.pt
server ntp04.oal.ul.pt

3- Iniciar o serviço do ntpd

/etc/init.d/ntpd start&nbsp;

Windows server 2K12R2 Second hard drive says write-protected

Find your PDC Emulator

Get-ADDomainController -Discover -Service PrimaryDC

Transfer domain roles if needed

https://technet.microsoft.com/pt-pt/library/cc816944(v=ws.10).aspx

ntp Servers Pt

http://www.pool.ntp.org/zone/pt
pool.ntp.org

Set NTP

https://blogs.technet.microsoft.com/nepapfe/2013/03/01/its-simple-time-configuration-in-active-directory

Using w32tm.exe

Run the following command on the PDC emulator:

w32tm /config /manualpeerlist:timeserver /syncfromflags:manual /reliable:yes /update

(where timeserver is a –space delimited– list of your time source servers)

Once done, restart W32Time service.

net stop w32time
net start w32time

Run the following command on all other DCs (that are not PDC):

w32tm /config /syncfromflags:domhier /update

Once done, restart W32Time service.

FIND DC servers

PS C:\Users\Administrador> nltest /dclist:mydomain.local

Lista com compilação de algumas entidades de multibanco úteis:

Lista com compilação de algumas entidades de multibanco

read more »

MySQL DATE_FORMAT

DATE_FORMAT(date,format)

%a    Abbreviated weekday name (Sun-Sat)
%b    Abbreviated month name (Jan-Dec)
%c    Month, numeric (0-12)
%D    Day of month with English suffix (0th, 1st, 2nd, 3rd, ?)
%d    Day of month, numeric (00-31)
%e    Day of month, numeric (0-31)
%f    Microseconds (000000-999999)
%H    Hour (00-23)
%h    Hour (01-12)
%I    Hour (01-12)
%i    Minutes, numeric (00-59)
%j    Day of year (001-366)
%k    Hour (0-23)
%l    Hour (1-12)
%M    Month name (January-December)
%m    Month, numeric (00-12)
%p    AM or PM
%r    Time, 12-hour (hh:mm:ss followed by AM or PM)
%S    Seconds (00-59)
%s    Seconds (00-59)
%T    Time, 24-hour (hh:mm:ss)
%U    Week (00-53) where Sunday is the first day of week
%u    Week (00-53) where Monday is the first day of week
%V    Week (01-53) where Sunday is the first day of week, used with %X
%v    Week (01-53) where Monday is the first day of week, used with %x
%W    Weekday name (Sunday-Saturday)
%w    Day of the week (0=Sunday, 6=Saturday)
%X    Year for the week where Sunday is the first day of week, four digits, used with %V
%x    Year for the week where Monday is the first day of week, four digits, used with %v
%Y    Year, numeric, four digits
%y    Year, numeric, two digits

The following script uses the DATE_FORMAT() function to display different formats. We will use the NOW() function to get the current date/time:

DATE_FORMAT(NOW(),’%b %d %Y %h:%i %p’)
DATE_FORMAT(NOW(),’%m-%d-%Y’)
DATE_FORMAT(NOW(),’%d %b %y’)
DATE_FORMAT(NOW(),’%d %b %Y %T:%f’)

The result would look something like this:

Nov 04 2014 11:45 PM
11-04-2014
04 Nov 14
04 Nov 2014 11:45:34:243

Azure Password Sync

Check your synchronization user security tab, or in domain properties if “Replicating Directory Changes” and “Replicating Directory Changes All” is checked.

OEM Windows Server 2016 Core Licensing Calculator

Below you will find a link to the OEM licensing calculator for Windows Serer 2016 Standard and Datacenter.

OEM Windows Server 2016 Core Licensing Calculator (.XLSX)

Secret Codes for Android Phones

The main functionality of having secret codes hidden within a mobile device was originally intended for the employees of the respective devices to trouble shoot and perform procedures. Yet now, living in a digital world, everyone has access to this information.

read more »