Posts

Showing posts from December, 2019

Generate simple java maven project

#generate simple java maven project
mvn archetype:generate -DgroupId=com.yourcompany -DartifactId=myproject -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Start SSH Agent on Windows/Linux

Windows:

Start a local Administrator PowerShell and run the following commands:

# Make sure you're running as an Administrator
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
Get-Service ssh-agent

Linux:

First, start the SSH Agent in the background by running the following in a terminal:

eval "$(ssh-agent -s)"
Then add these lines to your ~/.bash_profile so it starts on login:

if [ -z "$SSH_AUTH_SOCK" ]
then
   # Check for a currently running instance of the agent
   RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
   if [ "$RUNNING_AGENT" = "0" ]
   then
        # Launch a new instance of the agent
        ssh-agent -s &> .ssh/ssh-agent
   fi
   eval `cat .ssh/ssh-agent`
fi

How to turn on/off Dell laptop Keyboard backlit

Make sure the Keyboard backlit option is enabled in the BIOS. 
With the computer completely off, press the power button.
Immediately start pressing the F2 key once a second.
Click the + sign next to System Configuration.
Click Keyboard Illumination

Resolving Git line ending issues in WSL

On Windows you should add a .gitattributes file to your project to force consistent line endings
https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-wsl-resulting-in-many-modified-files

rsync to sync Remote files

The rsync command can be installed using Linux package managers (for example sudo apt install rsync on Debian/Ubuntu). For Windows, you'll need to either use WSL or Cygwin to access the command.

To use the command, navigate to the folder you want to store the synched contents and run the following replacing user@hostname with the remote user and hostname / IP and /remote/source/code/path with the remote source code location.

On macOS, Linux, or inside WSL:

rsync -rlptzv --progress --delete --exclude=.git "user@hostname:/remote/source/code/path" .

Or using WSL from PowerShell on Windows:

wsl rsync -rlptzv --progress --delete --exclude=.git "user@hostname:/remote/source/code/path" "`$(wslpath -a '$PWD')"

Convert your PuTTYGen keys

Reusing a key generated in PuTTYGen
If you used PuTTYGen to set up SSH public key authentication for the host you are connecting to, you need to convert your private key so that other SSH clients can use it. To do this:

Open PuTTYGen locally and load the private key you want to convert.

Select Conversions > Export OpenSSH key from the application menu. Save the converted key to a local location under the.ssh directory in your user profile folder (for example C:\Users\youruser\.ssh).

Validate that the local permissions on the exported key file only grant Full Control to your user, Administrators, and SYSTEM.

GCLI is a Graphical Command Line Interface.

GCLI wants command lines to be discoverable and beautiful in addition to being fast and powerful. GCLI commands are just JavaScript so it is easy to extend.

As part of developer tools, GCLI will enable developers to access a wide range of development and diagnosis tools without a cluttered interface. It will help users enter the correct parameters quickly and without reference to manuals.

Current web developer tools like Firebug and the Webkit Inspector have command lines, however they are largely unused for user interaction because they insist on a pure JavaScript syntax.
https://wiki.mozilla.org/DevTools/Features/GCLI

Never Invest In What You Don’t Understand

Only invest in what you do understand.
Invest in yourself if you have confidence in yourself. Otherwise invest in somebody else who you trust.

How to export a git log

To export a git log to a file:

$ git --no-pager log --after="2013-9-1" --before="2014-8-31" --author="i88.ca" > /tmp/git.i88.ca.txtAdd --all if you intend to search all branches and not just the current commit's ancestors in your repo.You can also easily match on multiple authors as regex is the underlying mechanism for this filter. So to list commits by i88.ca or goyun.info, you can do this: git log --author="\(i88\.ca\)\|\(goyun\.info\)" Formatting Log OutputFirst, this article will take a look at the many ways in which git log’s output can be formatted. Most of these come in the form of flags that let you request more or less information from git log. If you don’t like the default git log format, you can use git config’s aliasing functionality to create a shortcut for any of the formatting options discussed below. Please see in The git config Command for how to set up an alias. OnelineThe --oneline flag condenses each commit to a

Samsung Galaxy Tab: Install Google Play Store (Android Market) Via APK

Some versions of the Samsung Galaxy Tab don’t have the Google Play Store (Android Market) included with it. Here is a way to do it using a Windows PC and the Android SDK. Your alternative choice is to install Amazon Appstore for Android or you can install from F-droid

Amazon.com Widgets
Note: You have to have root access to perform these steps. You can refer this link to root your device.
1. Open Settings and select Applications. 2. Check Unknown sources. 3. Download and install the Android SDK.  4. Download and install the Android USB Drivers. 5. Download and install Root Explorer. (Since you don’t have Android Market, you’ll have to search for a Root Explorer APK file you can install on your device. Google it, and be sure to buy the app to support the developers. It’s totally worth $4.) 6. From your computer, download Vending-3.5.16.apk  (another download link)and GoogleServicesFramework.apk (another download link). 7. Mount the Galaxy Tab to your computer via USB cable and copy the  V…