Wednesday, May 23, 2018

Export All Google Tasks then Import into TickTick for All tasks : going back years!

Problem:

Google Task import into TickTick or GTasks only imports GTasks that are active and if Completed, then only 1 year old.

If you want to import very old Completed tasks into TickTick, there is no way to do this with the TickTick nor Google GTasks.


Solution:

Pre Req’s:

Get the Google Tasks Export Format:

https://tasks-backup.appspot.com/

Get the TickTick Import File Format:

See  https://help.ticktick.com/forum/topic/348273/import-list-items-from-excel

Also, run an export to see the EXACT format, there is heade and footer stuff

Run a export and save as a SampleTickTickExport.csv

See Figure 2 to compare TickTick and Google tasks csv format.


1. Export ALL tasks from Google Tasks to .csv including tasks up to 5 years old. using https://tasks-backup.appspot.com/ (check all the check boxes for hidden/deleted)

tasks_import_export_[email]_2018-05-24.csv

2. import that .csv into a SQL table, then transform the data to what TickTick expects.

Import GoogleTasks.csv  into SQL table. : [tasks_import_export_f]

Use SQL (attached file TaskImportExport.sql) to clean up data. Step 1 in sql file

Use SQL to create a new table “Staging” [tasks_import_export_d] Step 2 in sql file

3. Export staging data (see #2 below in SQL) to  a csv file using Results Save to file, save the csv name Staging_GTasks.csv 

4. Because TickTick wants unix style LF, you must supply a LF at end of each line , NOT CRLF

Open in Notepad++, replace CRLF with LF for (very easy in Notepad++)

5. Open Staging_GTasks.csv  in textpad & open SampleTickTickExport.csv

paste the contents from  Staging_GTasks.csv   into SampleTickTickExport.csv  in between header and footer.

6. import into Tick Tick using back utility (very nice!)

https://www.ticktick.com/#settings/backup


7. Done!

8. Someday soon automate this! perhaps 2-3days of code we could make a web app to create the TickTick file, or use this manual proc,

here is API that may be a start:

FAQ:

https://guide.ticktick.com/does_ticktick_have_an_api.html

Code:

https://docs.google.com/document/d/1zo0JdIWnQWi-D0v7xikknEnsLj4RmrzOuqzScdR_tm8/edit#heading=h.vmuori4i7puz

https://gist.github.com/jackinside/22dd1ed1011403646d6a

9. I may just change my mind buz:

https://blog.hubspot.com/marketing/best-to-do-list-apps-tools

Why pay when I get possibly all I need in Wunderlist?

3


Figure 1:

1.PNG


Figure 2:

2


Figure 3 SQL:

use [myNGC_STG_Custom_PCard]
go


-- -1) Clean Up

--select *  FROM [dbo].[tasks_import_export_f] where len([due])= 0 and len([completed]) =0
--update [dbo].[tasks_import_export_f] set [due] = '2018-04-29' where len([due])= 0 and len([completed]) =0
--select *  FROM [dbo].[tasks_import_export_f] where len([due])= 0 and len([completed]) =0
--update [dbo].[tasks_import_export_f] set [due] = '2018-04-29' where len([due])= 0 and len([completed]) =0

----update [dbo].[tasks_import_export_f] set [due] = [due] + 'T04:00:00+0000' where len([due])> 0
--update [dbo].[tasks_import_export_f] set [completed] = left([completed], 10) where len([completed])> 0
--update [dbo].[tasks_import_export_f] set [completed] = [completed] + 'T04:00:00+0000' where len([completed])> 0



--2) export to csv, save to file, replace CRLF with LF (Notpad++)
set nocount on

SELECT '"' +[tasklist_name]+ '"' "List Name"
       ,'"' +[title]+ '"' "Title"
       ,'"' +replace(dbo.[udfTrimInvalidChars](ltrim(rtrim([notes]))), '\n' , CHAR(13))+ '"'  "Content"
       --,replace(dbo.[udfTrimInvalidChars](ltrim(rtrim([notes]))), '\n' , CHAR(10) )  "Content2"
      
       ,'"' +'N' + '"' "Is Checklist"
       ,'"' +[due]+ '"' "Start Date"
       ,'"' +[due]+ '"' "Due Date"
       ,'"' +''+ '"' "Reminder"
       ,'"' +''+ '"' "Repeat"
       ,'"' + '0'+ '"' "Priority"
       ,'"' +case when len([completed]) > 0 Then '2' Else '0' End + '"' "Status"
       ,'"' +case when len(due) =0 then [completed] Else [due] End + '"' "Created Time"
       ,'"' +[completed]+ '"' "Completed Time"
       ,'"' +'-1099511627776' + '"' "Order"
       ,'"' +'America/New_York'+ '"' "Timezone"
       ,'"' +'' + '"' "Is All Day"
   FROM [dbo].[tasks_import_export_f]




CREATE FUNCTION [dbo].[udfTrimInvalidChars](@String VARCHAR(MAX))

RETURNS VARCHAR(MAX)
BEGIN
     Declare  @Result varchar(max)
    
     Set @Result = ltrim(rtrim(Isnull(@String, '')))
    
     Set @Result =  replace(replace(replace(replace(replace(replace(replace(@Result, '''', ''), '"', ''), '  ',  ' '), char(160), ''), CHAR (13) + CHAR (10) , ''), CHAR (10), ''), CHAR (9), '')
     Set @Result = case when len(@Result) = 0 then null else ltrim(rtrim(@Result)) End
 
 
     return dbo.[udfTrim](@Result)
END


 
 
 


 


CREATE FUNCTION [dbo].[udfTrim] (

@str VARCHAR(MAX)) RETURNS VARCHAR(MAX)
AS

BEGIN
DECLARE @trimchars VARCHAR(10)
SET @trimchars = CHAR(9)+CHAR(10)+CHAR(13)+CHAR(32)
IF @str LIKE '[' + @trimchars + ']%' SET @str = SUBSTRING(@str, PATINDEX('%[^' + @trimchars + ']%', @str), 8000)
RETURN ltrim(rtrim(@str))
END



--Refs:
--https://www.cnet.com/how-to/how-to-import-and-export-in-google-tasks/
--https://productforums.google.com/forum/#!topic/calendar/pSmEFZPJG50
--https://www.technorms.com/24082/export-gmail-tasks-google-tasks-backup
--https://tasks-backup.appspot.com/progress--https://help.ticktick.com/forum/topic/348273/import-list-items-from-excel
--https://www.ticktick.com/#settings/backup

Monday, May 7, 2018

Optimize Windows 7 64bit for an older laptop

1. Defrag using Defraggler

2. Malware checkup

3. Driver Checks

4. Remove AutoRun stuff + AutoRun & Revo Uninstaller free

5. Tune Paging File : General Rules Max/Min=(RAM * 1.5) per This Windows SuperIUser post with MS Reference

6. For more examples:

 and MS Best Practices for paging files accross Windows versions

more detailed Technical Insight from SysInternals Author!

image

Diagnostics:

a. Deterrmine Cause of performance issues during load using tools:

The size of your Paging File depends on the workload you are running.

The best advice can be found in this article:

http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx

It was written for Vista but is still true.

Run Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653 while running your maximum workload and monitor the peak commit charge on the memory tab of the System Information feature (ctrl+i).

b. Use Perfmon/Resource Monitor: check:

Commit Limit
Crash dump size

Perfmon: Add the following counters:

      • Memory\Committed Bytes - Committed Bytes is the amount of committed virtual memory, in bytes.
      • Memory\Committed Limit - Amount of virtual memory that can be committed without having to extend the paging file
      • Memory\% Committed Bytes In Use - Ratio of Memory\Committed Bytes to the Memory\Commit Limit

The page file size formula should be:

(Max value of Committed Bytes + additional 20% buffer to accommodate any workload bursts)-RAM size

For example: If the server has 24 GB RAM and the maximum of Committed Bytes is 26 GB, then the recommended page file will be: (26*1.2)-24)  = 7.2 GB


to bo continued…

Saturday, May 5, 2018

Get MS Office Photo Editor Back

Like the MS Photo Editor from Office 2010, with it simple UI, Bath functions, fast batch cropping and auto enhance, a nice day to day photo editor without any fluff? Well its back, here, get it via way back or an msi custom :



Custom MSI
https://www.sevenforums.com/music-pictures-video/221827-i-want-my-ms-photo-editor-back.html

and
Way Back:
https://answers.microsoft.com/en-us/windowslive/forum/gallery-program/where-to-download-windows-essentials-2012/7665b354-4f2b-445d-811e-9d8c98e8f872

Thursday, May 3, 2018

Basic Privacy Notepad and Windows Utils to keep machine clean and drive fast

1. Use secure notepad in cloud

https://www.protectedtext.com


2. use Browser: use Brave

https://brave.com/


3. Keep PC Clean

https://www.ccleaner.com/ccleaner/download

4. Keep Disk Drive Defraggd

https://www.ccleaner.com/defraggler

5. Windows 10 : remove windows 10 crap:

https://sourceforge.net/projects/windows8appremover/

more on win 10…

Thursday, April 19, 2018

SQL Server Management Studio Font Error : SSMS Cannot create an editor

When trying to run a query or open ssms, you receive this error, related to fonts:

Screenshot_2

Error Desc:

Object reference not set to an instance of an object. (Microsoft.VisualStudio.Editor.Implementation) ------------------------------ Program Location: at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.SetScrollPosition(Int32 iBar, Int32 iFirstVisibleUnit)


To Resolve:

Solution 1 - Run Fixit tool for KB4074906

Microsoft has released a Fixit tool for KB4074906, available on Windows Update, WSUS, Microsoft Update Catalog, and as a direct download.

and/or
Solution 2 - Replace GlobalUserInterface.CompositeFont Manually

Manually replace corrupted font file with correct version.

  1. Download GlobalUserInterface.CompositeFont (default download for Windows 7 is %USERPROFILE%\Downloads).
  2. Launch cmd as Administrator and navigate to %windir%\Microsoft.NET\Framework\v4.0.30319\WPF\Fonts and run:
    xcopy /y %USERPROFILE%\Downloads\GlobalUserInterface.CompositeFont .
    (or copy and paste the GlobalUserInterface.Composite file through Windows Explorer to %windir%\Microsoft.NET\Framework\v4.0.30319\WPF\Fonts)
  3. Re-launch WPF application.
  4. Reboot machine and re-launch application if you still have trouble.

Sunday, April 15, 2018

Windows Command Line Command for Control Panel Applets

Examples of all control panel applets commands, use to exec via command line & combined with runas to exec varying commands under differring permssions as needed


Run As Examples:

runas /username:FLCDTL01JD832S\aspdebug "rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl"

runas /username:FLCDTL01JD832S\aspdebug "rundll32.exe shell32.dll,Control_RunDLL ncpa.cpl"


Commands:

Control Panel AppletCommandOS Version
Accessibility Optionscontrol access.cplXP
Action Centercontrol /name Microsoft.ActionCenter8, 7
control wscui.cpl8, 7
Add Features to Windows 8control /name Microsoft.WindowsAnytimeUpgrade8
Add Hardwarecontrol /name Microsoft.AddHardwareVista
control hdwwiz.cplXP
Add or Remove Programscontrol appwiz.cplXP
Administrative Toolscontrol /name Microsoft.AdministrativeTools8, 7, Vista
control admintools8, 7, Vista, XP
Automatic Updatescontrol wuaucpl.cplXP
AutoPlaycontrol /name Microsoft.AutoPlay8, 7, Vista
Backup and Restore Centercontrol /name Microsoft.BackupAndRestoreCenterVista
Backup and Restorecontrol /name Microsoft.BackupAndRestore7
Biometric Devicescontrol /name Microsoft.BiometricDevices8, 7
BitLocker Drive Encryptioncontrol /name Microsoft.BitLockerDriveEncryption8, 7, Vista
Bluetooth Devicescontrol bthprops.cpl138, 7, Vista
control /name Microsoft.BluetoothDevicesVista
Color Managementcontrol /name Microsoft.ColorManagement8, 7, Vista
Color1WinColor.exe2XP
Credential Managercontrol /name Microsoft.CredentialManager8, 7
Client Service for NetWarecontrol nwc.cplXP
Date and Timecontrol /name Microsoft.DateAndTime8, 7, Vista
control timedate.cpl8, 7, Vista
control date/time8, 7, Vista, XP
Default Locationcontrol /name Microsoft.DefaultLocation7
Default Programscontrol /name Microsoft.DefaultPrograms8, 7, Vista
Desktop Gadgetscontrol /name Microsoft.DesktopGadgets7
Device Managercontrol /name Microsoft.DeviceManager8, 7, Vista
control hdwwiz.cpl8, 7, Vista
devmgmt.msc8, 7, Vista, XP3
Devices and Printerscontrol /name Microsoft.DevicesAndPrinters8, 7
control printers8, 7
Displaycontrol /name Microsoft.Display8, 7
control desk.cplXP
control desktopXP
Ease of Access Centercontrol /name Microsoft.EaseOfAccessCenter8, 7, Vista
control access.cpl8, 7, Vista
Family Safetycontrol /name Microsoft.ParentalControls8
File Historycontrol /name Microsoft.FileHistory8
Flash Player Settings Managercontrol flashplayercplapp.cpl8
Folder Optionscontrol /name Microsoft.FolderOptions8, 7, Vista
control folders8, 7, Vista, XP
Fontscontrol /name Microsoft.Fonts8, 7, Vista
control fonts8, 7, Vista, XP
Game Controllerscontrol /name Microsoft.GameControllers8, 7, Vista
control joy.cpl8, 7, Vista, XP
Get Programscontrol /name Microsoft.GetPrograms8, 7, Vista
Getting Startedcontrol /name Microsoft.GettingStarted7
Home Groupcontrol /name Microsoft.HomeGroup8, 7
Indexing Optionscontrol /name Microsoft.IndexingOptions8, 7, Vista
rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll8, 7, Vista, XP
Infraredcontrol /name Microsoft.Infrared8, 7
control irprops.cpl8, 7, Vista
control /name Microsoft.InfraredOptionsVista
Internet Optionscontrol /name Microsoft.InternetOptions8, 7, Vista
control inetcpl.cpl8, 7, Vista, XP
iSCSI Initiatorcontrol /name Microsoft.iSCSIInitiator8, 7, Vista
Keyboardcontrol /name Microsoft.Keyboard8, 7, Vista
control keyboard8, 7, Vista, XP
Languagecontrol /name Microsoft.Language8
Location and Other Sensorscontrol /name Microsoft.LocationAndOtherSensors7
Location Settingscontrol /name Microsoft.LocationSettings8
Mail4control mlcfg32.cpl58, 7, Vista, XP
Mousecontrol /name Microsoft.Mouse8, 7, Vista
control main.cpl8, 7, Vista
control mouse8, 7, Vista, XP
Network and Sharing Centercontrol /name Microsoft.NetworkAndSharingCenter8, 7, Vista
Network Connectionscontrol ncpa.cpl8, 7, Vista
control netconnections8, 7, Vista, XP
Network Setup Wizardcontrol netsetup.cpl8, 7, Vista, XP
Notification Area Iconscontrol /name Microsoft.NotificationAreaIcons8, 7
ODBC Data Source Administratorcontrol odbccp32.cplXP6
Offline Filescontrol /name Microsoft.OfflineFiles8, 7, Vista
Parental Controlscontrol /name Microsoft.ParentalControls7, Vista
Pen and Input Devicescontrol /name Microsoft.PenAndInputDevicesVista
control tabletpc.cplVista
Pen and Touchcontrol /name Microsoft.PenAndTouch8, 7
control tabletpc.cpl8, 7
People Near Mecontrol /name Microsoft.PeopleNearMe7, Vista
control collab.cpl7, Vista
Performance Information and Toolscontrol /name Microsoft.PerformanceInformationAndTools8, 7, Vista
Personalizationcontrol /name Microsoft.Personalization8, 7, Vista
control desktop8, 7, Vista
Phone and Modem Optionscontrol /name Microsoft.PhoneAndModemOptionsVista
control telephon.cplVista, XP
Phone and Modemcontrol /name Microsoft.PhoneAndModem8, 7
control telephon.cpl8, 7
Power Optionscontrol /name Microsoft.PowerOptions8, 7, Vista
control powercfg.cpl8, 7, Vista, XP
Printers and Faxescontrol printersXP
Printerscontrol /name Microsoft.PrintersVista
control printersVista
Problem Reports and Solutionscontrol /name Microsoft.ProblemReportsAndSolutionsVista
Programs and Featurescontrol /name Microsoft.ProgramsAndFeatures8, 7, Vista
control appwiz.cpl8, 7, Vista
Recoverycontrol /name Microsoft.Recovery8, 7
Regioncontrol /name Microsoft.RegionAndLanguage8
control intl.cpl8
control international8
Region and Languagecontrol /name Microsoft.RegionAndLanguage7
control intl.cpl7
control international7
Regional and Language Optionscontrol /name Microsoft.RegionalAndLanguageOptionsVista
control intl.cplVista
control internationalVista, XP
RemoteApp and Desktop Connectionscontrol /name Microsoft.RemoteAppAndDesktopConnections8, 7
Scanners and Camerascontrol /name Microsoft.ScannersAndCameras8, 7, Vista
control sticpl.cplXP
Scheduled Taskscontrol schedtasksXP7
Screen Resolutioncontrol desk.cpl8, 7
Security Centercontrol /name Microsoft.SecurityCenterVista
control wscui.cplXP
Software Explorers8msascui.exe9XP
Soundcontrol /name Microsoft.Sound8, 7
control /name Microsoft.AudioDevicesAndSoundThemesVista
control mmsys.cpl8, 7, Vista
Sounds and Audio Devicescontrol mmsys.cplXP
Speech Recognition Optionscontrol /name Microsoft.SpeechRecognitionOptionsVista
Speech Recognitioncontrol /name Microsoft.SpeechRecognition8, 7
Speechcontrol sapi.cpl10XP
Storage Spacescontrol /name Microsoft.StorageSpaces8
Sync Centercontrol /name Microsoft.SyncCenter8, 7, Vista
Systemcontrol /name Microsoft.System8, 7, Vista
control sysdm.cplXP
System Propertiescontrol sysdm.cpl8, 7, Vista
Tablet PC Settingscontrol /name Microsoft.TabletPCSettings8, 7, Vista
Task Scheduler7control schedtasks8, 7, Vista
Taskbarcontrol /name Microsoft.Taskbar8
rundll32.exe shell32.dll,Options_RunDLL 18
Taskbar and Start Menucontrol /name Microsoft.TaskbarAndStartMenu7, Vista
rundll32.exe shell32.dll,Options_RunDLL 17, Vista, XP
Text to Speechcontrol /name Microsoft.TextToSpeech8, 7, Vista
Troubleshootingcontrol /name Microsoft.Troubleshooting8, 7
User Accountscontrol /name Microsoft.UserAccounts8, 7, Vista
control userpasswords8, 7, Vista, XP
Welcome Centercontrol /name Microsoft.WelcomeCenterVista
Windows 7 File Recoverycontrol /name Microsoft.BackupAndRestore8
Windows Anytime Upgradecontrol /name Microsoft.WindowsAnytimeUpgrade7, Vista
Windows CardSpacecontrol /name Microsoft.CardSpace7, Vista
control infocardcpl.cpl7, Vista
Windows Defendercontrol /name Microsoft.WindowsDefender8, 7, Vista11
Windows Firewallcontrol /name Microsoft.WindowsFirewall8, 7, Vista
control firewall.cpl8, 7, Vista, XP
Windows Marketplacecontrol /name Microsoft.GetProgramsOnlineVista
Windows Mobility Centercontrol /name Microsoft.MobilityCenter8, 7, Vista
Windows Sidebar Propertiescontrol /name Microsoft.WindowsSidebarPropertiesVista
Windows SideShowcontrol /name Microsoft.WindowsSideShow8,7, Vista
Windows Updatecontrol /name Microsoft.WindowsUpdate8, 7, Vista12
Wireless Linkcontrol irprops.cplXP
Wireless Network Setup Wizard?XP

Disable Task Manager : Applies to Win 7 and up:

Disable Task Manager : Applies to Win 7 and up:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableTaskMgr"=dword:00000001

Results in task manager grayed out: