Extremely Serious

Category: Tool (Page 3 of 4)

Creating a Google App Password

Procedure

    1. Sign-in to https://accounts.google.com/ using the account to wanted to use.
    2. Click Security from the side menu
    3. On the Signing in to Google section, click App Passwords.
    4. Select the application you wanted to use from google (e.g. Mail, Calendar, Contacts or YouTube).
    5. Select the Other (Custom name) for the device, and name it appropriately.
    6. Click the generate button.
  1. Now you have your 16-character password that you can use.

Using RSYNC to Sync Some Local Directories to Remote Directory via SSH

Requirement

  • SSH Server on Remote Computer

Syntax

To sync some of your local directories to a remote directory via ssh you can use the following syntax:

rsync -av -L --delete -e ssh <DIR1>[[ <DIR2>] <DIRn>] <REMOTE_USER>@<REMOTE_HOST>:<REMOTE_DIR>
Token Description
DIR1, DIR2, DIRn These are the local directories you've wanted to be synced remotely. Only DIR1 is required and the rest are optional.
REMOTE_USER A valid user on the remote machine.
REMOTE_HOST A valid address of the remote machine.
REMOTE_DIR The destination directory on the remote machine.

Example

rsync -av -L --delete -e ssh /data/artifactory backup01@10.0.0.204:/volume1/backup

Deploy Function using Azure Functions Core Tools

Use the following command to deploy a(some) locally developed function(s) to azure function app.

func azure functionapp publish <AZURE_FUNCTION_APP>

Note: This command will only work if your terminal session was signed in to azure. The login using the command found here.

Where:

AZURE_FUNCTION_APP The name of the function app found in azure portal.

Configuring Archiva with MariaDB in Synology Diskstation

  1. Install Tomcat 7 package in Diskstation
  2. Download archiva war file from the following address:
    https://archiva.apache.org/index.cgi
  3. Place the downloaded war file (e.g. apache-archiva-2.2.3.war) into the following directory:
    /volume1/@appstore/Tomcat7/src/webapps/
  4. In MariaDB, add the following user with appropriate password.
    archivauser

    and the following database

    archiva
  5. Download the following jar files:
    mail-1.4.jar 
    mariadb-java-client-1.5.x.jar
  6. Place the download jar files in the following directory:
    /volume1/@appstore/Tomcat7/src/lib
  7. Create archiva.xml file in the following location:
    /volume1/@appstore/Tomcat7/src/conf/Catalina/localhost

    Add the following entries:

    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/archiva" docBase="/volume1/@appstore/Tomcat7/src/webapps/<ARCHIVA_WAR_FILENAME>">
    <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
    	username="archivauser"
    	password="<PASSWORD_HERE>"
    	driverClassName="org.mariadb.jdbc.Driver"
    	url="jdbc:mariadb://<MARIADB_HOST_IP>:<MARIADB_HOST_PORT
    	/archiva?autoReconnect=true" />
    <Resource name="mail/Session" auth="Container" 	type="javax.mail.Session" mail.smtp.host="localhost"/>
    </Context>

    Note: The <ARCHIVA_WAR_FILENAME>, <PASSWORD_HERE> <MARIADB_HOST_IP> and <MARIADB_HOST_PORT tokens must be replaced by the downloaded war file from step 2, password used from step 4, IP address of MariaDB and port used by MariaDB repectively.

  8. Access archiva using the following address:
    http://<DISKSTATION_HOST_IP>:7070/archiva

    Note: Update the token <DISKSTATION_HOST_IP> with the IP of your Synology Diskstation.

PoSH-GVM (PowerSHell Groovy enVironment Manager)

Source:  https://github.com/flofreud/posh-gvm

Introduction

A tool for managing parallel Versions of multiple Software Development Kits on a windows based system.

Powershell Behind Proxy
Setting default Powershell TLS Protocol

Installation via Short Script

Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/flofreud/posh-gvm/master/GetPoshGvm.ps1' | iex

Usage

Displaying the tool capability using the following:

gvm [help]

Useful Commands

Command Description
list Lists the available, installed and default versions of the candidate.
install Downloads and installs a particular candidate version (i.e. will default to latest if version is not specified)
use Uses a particular candidate version that is not the default.
default Sets a default version to use of a particular candidate.
current Displays the current active candidates version.
uninstall Uninstalls a particular candidate version.

Always On Top using AutoHotKey

  1. Create an autohotkey script (e.g. alwaysontop.ahk).
  2. Add the following entries:
    #^+t::
    	WinSet, AlwaysOnTop, On, A
    Return
    
    #^t::
    	WinSet, AlwaysOnTop, Off, A
    Return

    Example script

    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    
    #^+t::
    	WinSet, AlwaysOnTop, On, A
    Return
    
    #^t::
    	WinSet, AlwaysOnTop, Off, A
    Return

To make a window always on top press the following combination:

Win + Ctrl + Shift + t

To disable the effect of the always on top press the following combination:

Win + Ctrl + t
« Older posts Newer posts »