Wednesday, October 24, 2018

SnapCopy: Copy on Computer Paste to your Phone

Snapcopy: Coolest Clipboard out there

1. Download Snapcopy Extension

2. Download Andorid App SnapCopy on ur phone

3. Scan the barcode, boom. Done.

4. Copy on ur PC/Paste to ur phone. and vice versa

Belt.IO : alternative, however it is not as easy as SnapCopy

1. Create account at Belt.IO

2. go to your belt:https://belt.io/belt paste some text into your belt

- there is also a Chrome Extension for belt.io

3. On any other device (phone / another computer)

- Open your belt : :https://belt.io/belt and Copy the text u just pasted

- On Android : install this App, makes it easier to copy/paste

4. On your phone use belt.io app:

Monday, October 15, 2018

GMail Search & Filters : Search Syntax + some filter examples to auto label emails

References:

Gmail Filters : Exhaustive Syntax Documentation

Some advanced Gmail Filter topics

** Note ** : Gmail does NOT support search using partial matches, instead GMail

only supports while word searches.  E.g: This does not work: “Find emails that contain any word that starts with Driv%” , The

To and From are the only fields that allow p[artial searching, e.g: find emails that are from @ally.com

Searching:

1. Search Examples using GMails Search Syntax Examples:

Just copy aand paste the below searches into the Gmail search text box to test
  From is from a certain domain:
         from:(@ally.com)
         from:(@ally.com | @expediamail.com)
         same as
         from:(@ally.com OR @expediamail.com)
        
   Before/After Date
         before:2018/9/1
         after:2018/9/1 before:2018/11/18
        
   Before/After Relative Date (instead of specific date)
         newer_than:2d
         older_than:30d
    
   Search multiple labels!
         label:(sent OR inbox)
         label:(sent OR inbox) Indeed
         label:(awork-jobs OR awork-jobs-jobsites) Indeed
         label:(awork-jobs OR awork-jobs-jobsites) older_than:30d

Filtering and Labels

1. Create Gmail Filter to auto label incoming emails:

Requirement:

When an incoming email is received the email shall be saved to a label .\AWork\Jobs\Insurance if the email contains the word Cigna and if the email was not sent from jdoyle@MyDomain.NET

(Create the label first if it does not exist)

How to Build step by Step:

Search:

from:(-from jdoyle@MyDomain.NET) Cigna


Filter:

image_thumb[9]

2. Gmail Filters Syntax


Gmail Filter Syntax Examples for and/or searching:

OR
     to:adam OR subject:iPhone
     is same as
     {to:adam subject:iPhone}


AND
     to:adam AND subject:iPhone
     is same as
     to:adam subject:iPhone
     is same as
     (to:adam subject:iPhone )
   
() parens -> AND
{} brackets -> OR
    


3. Create advanced Filter to auto label incoming emails:

e.g: I need to move emails from Inobx into, I want to move emails based on following requirements:

If incoming email contains the words job or opportunity or contract and email is NOT from a job site alert, then save email to .\AWork\Jobs


If incoming email contains the words job or opportunity or contract and email is NOT from a job site alert AND email has the word Melbourne in it, then save email to .\AWork\Jobs\Melbourne


If incoming email contains the words job or opportunity or contract and email is NOT from a job site alert AND email has the word remote or telecommute in it, then save email to .\AWork\Jobs\Remote



.\AWork\Jobs

(job | opportunity | contract) -{remote from:{alert@indeed.com alerts@ziprecruiter.com inmail-hit-reply@linkedin.com noreply@updates.freelancer.com noreply@updates.freelancer.com info@mail.glassdoor.com noreply@glassdoor.com dartcontainer-jobnotification@noreply.jobs2web.com}} -in:chats


Looks like this:

image_thumb[1]


.\AWork\Jobs\Melbourne

Search:

Find all job emails for melbourne area that are NOT from an automated job site like indeed or ziprecruiter and not in my chats.

(in:anywhere (job | opportunity | contract) (melbourne | "Palm Bay" | Cocoa) -subject:Enterprise -("car rental") -{remote from:{alert@indeed.com alerts@ziprecruiter.com inmail-hit-reply@linkedin.com noreply@updates.freelancer.com noreply@updates.freelancer.com info@mail.glassdoor.com noreply@glassdoor.com dartcontainer-jobnotification@noreply.jobs2web.com}} -in:chats)

Filter:

image_thumb[3]


.\AWork\Jobs\Remote

Search:

((remote | telecommuting | telecommute | remoting) -from:{jdoyle@jrdtechnologies.net alert@indeed.com alerts@ziprecruiter.com inmail-hit-reply@linkedin.com noreply@updates.freelancer.com noreply@updates.freelancer.com info@mail.glassdoor.com noreply@glassdoor.com dartcontainer-jobnotification@noreply.jobs2web.com})


Filter:

image_thumb[5]

When saving a filter be sure to use these options to move an email to a label:

image_thumb[7]

Google Search:

below applies to Google search

1. Google Search by date:

image

 

FYI:

Why Searching using Wildcard in Gmail doesn’t work and some alternatives

https://www.labnol.org/internet/advanced-gmail-search/21623/

http://sirlagz.net/2015/04/27/searching-gmail-with-wildcards/

(online2|online3|online4).provider.com

Thursday, October 11, 2018

Windows 10 : Stop Network Shares from dropping between restarts

you may notice that the network/mapped drives are randomly disappearing. A logoff/login will fix it temporarily, but what a pain. This is how you permanently fix the vanishing drives.


Registry Method

Use this method to change default time-out period of autodisconnect .

  1. Run |  regedit

  2. Locate and then click the following key in the registry:

  3. autodisconnect

Key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

Value:

Value: autodisconnect
Data type : REG_DWORD
Range : Hexadecimal
Default value: ffffffff

4. KeepConn : Change time-out the client-side during a UNC connection, specify in KeepConn. Locate and then click the following key in the registry:


Key:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters]

Value:

Value: KeepConn
Data type : REG_DWORD
Range : 1 to 65535 (sec)
Default value: 600 sec = 10 mins

Command Line Method

1. autodisconnect  :

change the default time-out period for the autodisconnect feature of the Server service,

2. Run | cmd as Admin


3. Type following cmd:

net config server /autodisconnect:-1

net config server /autodisconnect:number

More info:

0 = the autodisconnect feature is not turned off

-1 = the autodisconnect feature is turned off

1-65,535 =  number is the number of minutes that you want the server to wait before it disconnects a mapped network drive

4. Windows 10 only:

This can the SMB issues with dropping network shares:open a administrator command prompt and type the following hitting enter after each line.


sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled

then Restart the computer

To reverse :


sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb20 start= auto
then Restart the computer


Others:

1. Network Adapters:

I've found that by turning off the network card's power saving features I've not been losing the drives.

2. Group Policy :

Group Policy drives which are set to "Recreate". Windows 8/10 automatically runs Group Policy updates in the background and disconnects/reconnects the drive to Recreate it.

Change the drive to "Update" in group policy and the issue will disappear!

Run | gpedit.msc:

User Configuration > Preferences > Windows Settings > Drive Maps

Change the drive to “Update” in group policy

See example here


3. Run a custom .bat file on login and network connect:


- FixMappedDrives.bat

Sample file below, this connects to mapped drives based on loginid of user, in this case I am hard coding a userid to a mapped drive credential. This could be altered to use dynamic credentials based on userid and lookup up creds based on current logged in user.

- task Scheduler

Run bat fule on following events:

A) Login and

StartUp using StartUp folder or Task Scheduler Logon event

B) Network connect

Task Scheduler task: Network connect event


- Sample files:


FixedMapDrives.bat


@echo off
echo MyFileServer:MapDrives Login Script START

echo MyFileServer:MapDrives Checking connection to MyFileServer....
ping -n 10 MyFileServer > nul
echo MyFileServer:MapDrives done Checking connection to MyFileServer.... Error: %errorlevel%

if %errorlevel% == 0 (
     echo MyFileServer:MapDrives CONNECTED
     goto connected
) ELSE (
     echo MyFileServer:MapDrives ERROR- Not Connected
     goto end
)


:connected
     echo MyFileServer start Map Drives for user %username%...
     echo off
       net use * /delete /yes
      
    
     IF /i NOT "%username%"=="User1" GOTO NEXT1
         echo MyFileServer:MapDrives Add DoyleJ mapped drives
         net use * /delete /yes
         NET USE M: \\MyFileServer\homes\User1  /USER:MyFileServer\User1 SomePassword
         NET USE Y: \\MyFileServer\Public  /USER:MyFileServer\User1 SomePassword
         NET USE P: \\MyFileServer\Photo  /USER:MyFileServer\User1 SomePassword
         NET USE V: \\MyFileServer\Video  /USER:MyFileServer\User1 SomePassword
       GOTO ENDIF
    
     :NEXT1
     IF /i NOT "%username%"=="user2" GOTO NEXT2
         echo Add user2
         echo off
           net use * /delete /yes
           NET USE M: \\MyFileServer\homes\user2  /USER:MyFileServer\user2 SomePassword
         NET USE Y: \\MyFileServer\Public  /USER:MyFileServer\user2 SomePassword
         NET USE P: \\MyFileServer\Photo  /USER:MyFileServer\user2 SomePassword
         NET USE V: \\MyFileServer\Video  /USER:MyFileServer\user2 SomePassword
       GOTO ENDIF
    
      
     :NEXT2
         echo Add Public
         echo off
           net use * /delete /yes
         NET USE Y: \\MyFileServer\Public  /USER:MyFileServer\User1 SomePassword
       GOTO ENDIF
    
     :ENDIF
    
:end

echo MyFileServer Login Script DONE

- Powershell


FixedMapDrives.ps1

$i=3
     while($True){
     $error.clear()
     $MappedDrives = Get-SmbMapping |where -property Status -Value Unavailable -EQ | select LocalPath,RemotePath
     foreach( $MappedDrive in $MappedDrives)
     {
         try {
             New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True
         } catch {
             Write-Host "There was an error mapping $MappedDrive.RemotePath to $MappedDrive.LocalPath"
         }
     }
     $i = $i - 1
     if($error.Count -eq 0 -Or $i -eq 0) {break}

    Start-Sleep -Seconds 30

}