Linux: Bash: Echo Commands

echo Options


 Options      Description
 -n      do not print the trailing newline.
 -e      enable interpretation of backslash escapes.
 \b      backspace
 \\      backslash
 \n      new line
 \r      carriage return
 \t      horizontal tab
 \v      vertical tab
Tags

Pi: Samba: Initial setup

Raspberry Pi change username

Sources:

Pi username change

log out
sudo passwd root
<root_passwd>

logout

usermod –l mdp pi
<mdp_passwd>

Check home dir

usermod –m –d/home/mdp mdp

Pi Password change

Logout
login mdp
passwd

Samba - list users

sudo pdbedit -L -v

Unix username:        jimmy
NT username:          
Account Flags:        [U          ]
User SID:             S-1-
Tags

Git: /.git/hooks/post-commit to push to origin repo on commit

Some applications - such as gitg - make available LOCAL commits & branch management, but have no provision for PUSHING to the remote origin.

Luckly, git leverages 'hooks' that provide a means to add shell scripts for such a need.

Once a commit is done on a branch, git will call "/.git/hooks/post-commit" and - if present - will run the contained shell script.


#!/bin/bash

#
# post-commit web hook
#
#git push -u origin develop
git push -u origin ffsync-setup

#
# set this file to executable
#
# chmod 755 post-commit
#

this code block will push the ffsync-setup branch to the remote origin

 

Tags

Linux: WINE: porting Wine form one host to another

source: http://wiki.playonlinux.com/index.php/How_to_move_PlayOnLinux_virtual_drives_to_another_disk

 

How to move PlayOnLinux virtual drives to another disk

 

There have been several requests for this feature over the years, but nothing has been implemented yet.

However, you can manage disk space the Unix way, which requires no special application support (taken from https://www.playonlinux.com/en/topic-10841-PoL_Directory_Location.html ):

Tags

Chrome Lighthouse Audit Tool

 

Download nodejs

to test deployment, run version command

nodejs$ ./node -v

$ v10.16.0

Install Chrome

Install lighthouse

npm install -g lighthouse

Lighthouse CLI

lighthouse <url>

lighthouse https://google.com

 

Testing NodeJS/Creating a NodeJS Server

/**
 * SanityTest for NodeJS v10
 */

var http = require('http');
http.createServer(
    function handler(req,res){
        res.writeHead(200,{'Content-Type': 'text/plain'});
        res.end('Hello World\n');
    }).listen(1337, '127.0.0.1');
    
console.log('Server running at http://127.0.0.1:1337/');

 

 

 

 

Subscribe to