App-Cheats

 view release on metacpan or  search on metacpan

cheats.txt  view on Meta::CPAN

## C,CPP General
#############################################################

# View where a c code function is defined (Symbol table,OMS)
nm file -l 2>/dev/null
080fb204 T function
0804fa75 T function2   file:123
# T - The symbol is in the text (code) section
# Uppercase means global (external)

# View strings in a binary file
strings <file>

# Turn c code into assembler code
objdump -d <bin_file>

# In C code, pointers and arrays are closely related:
int var[] = {10, 100, 200};
int *ptr = var;
# &ptr is bfbab19c
# &var is bfbab1a0
# ptr is bfbab1a0
# var is bfbab1a0
# &ptr[0] is bfbab1a0
# &var[0] is bfbab1a0

# In C code, array name, address of array name, and
# address of first array element are all the same
var     is bffddf20
&var    is bffddf20
&var[0] is bffddf20

# Array of pointer in c code
# Array of strings
char *name[] = {
   "name1",
   "name2",
   "name3",
   "name4",
   "name5",
   "name6",
};

# Read from the command line in c code
int main(int argc, char *argv[])

# Process command line inputs in c code
#include<stdio.h>
int main(int argc, char *argv[]){
   int i;
   for(i=0; i<argc; i++){
      printf("argv[%d]: %s\n", argc, argv[i]);
   }
   return(0);
}

# Get ascii and characters in c code (DES)
printf("d:%d c:%c\n", 'A', 'A');

# Rename the oms trace files
ls -1 | perl -lpe '$o=$_; s/_[c0][a-z0-9]*_\d+//; rename $o => $_'

# Call C++/CPP function from C Step 1(OMS)
# Put code inside:
#ifdef __cplusplus
# // c++ code goes here
#endif

# Call C++/CPP function from C Step 2(OMS)
# Make external the function
extern "C" void my_func(void);

# Macro function in c code (OMS,bison,flex)
#define DEBUG 1
#define PRINT_IN_DEBUG(token) if(DEBUG){ cout << "   Flex saw [" << yytext << "] (" << token << ")" << endl; }

# Use value from a string.
# Convert "std:string" to "const char *"
std::string name
name.c_str()

# Convert "std:string" to "char *"
std::string name
&name[0u]

# Read lines from a file (c program)
char *file_name = strcat(name, ".cmd");
char line[512];
FILE *fp;
fp = fopen(file_name, "r");
if(fp == NULL)
{
   sendlog("ERROR: Could not open file: '%s'", file_name);
   return 1;
}
while (fgets( line, sizeof(line), fp ) != NULL)
{
   line[strlen(line) - 1] = '\0';
   sendlog("Line1: '%s'", line);
   yyParseAndExecute( line );
}

# The -m32 flag is necessary for both compiling and linking (gcc,DES)

# Sample C program. Prints to STDOUT and STDERR
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]){
	fprintf(stderr, "Select folder:\n");
	fprintf(stderr, "1 C:\\TOOLS\n");
	fprintf(stderr, "2 C:\\BAT\n");
	printf("C:\\TOOLS\n");
	fprintf(stderr, "3 C:\\BAT2\n");
	return 0;
}

# Fix Error: forbids converting a string constant to 'char*'
argv[1] = (char *) "name = bob";


#############################################################

cheats.txt  view on Meta::CPAN

docker ps
ctop


#############################################################
## Docker Setup
#############################################################

# Enable cgroups in ubuntu (for docker)
sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=1 cgroup_enable=memory cgroup_memory=1"
sudo update-grub
reboot

# Check if cgroups is enabled (ubuntu)
cat /proc/cmdline

# Check if using cgroups v1:
ls /sys/fs/cgroup
blkio  cpuacct      cpuset   freezer  memory   net_cls,net_prio  perf_event  rdma     unified
cpu    cpu,cpuacct  devices  hugetlb  net_cls  net_prio          pids        systemd

# Check if using cgroups v2:
ls /sys/fs/cgroup
cgroup.controllers  cgroup.max.descendants  cgroup.stat             cgroup.threads  system.slice
cgroup.max.depth    cgroup.procs            cgroup.subtree_control  init.scope      user.slice


#############################################################
## Docker Build
#############################################################

# Build a docker image based on the Dockerfile
cd ~/tmp/learning_docker/02-*
docker build .
docker images
# EXPOSE 80 in Dockerfile does nothing
docker run -p 3000:80 <IMAGE_ID>
http://localhost:3000/
docker ps
docker stop <CONTAINER_ID>

# Run interactive container (perl shell)
docker run -it perl
docker run -it py-max

# Restart container for CLI
docker start -a -i 99150a04a616

# Run interactive container (bash shell)
docker run -it perl bash

# Go inside a running container.
docker container exec -it feedback-app bash

# Build updated perl image.
docker build -t my-perl .
docker run my-perl -E 'say $^V'

# Rename a docker container
docker container rename <CONTAINER_ID> my-perl-container

# Restart a container
docker container start -a my-perl-container


#############################################################
## Docker Dockerfile Commands
#############################################################
# Dockerfile commands:
# These are executed only during a BUILD.
FROM perl
WORKDIR /app
COPY . /app
RUN echo "Building the image now"
RUN perl -E 'say "Image uses perl version: $^V"'

# Dockerfile commands:
# These are executed only during a RUN.
CMD [ "ls" ]
CMD [ "echo", "Run the container now" ]
CMD [ "perl", "my.pl" ]
#
ENTRYPOINT [ "perl" ]
docker run <IMAGE_ID> -E 'say $^V'

# Dockerfile commands:
# COPY can be controlled by
cat .dockerignore
.git*
node_modules


#############################################################
## Docker Images/Containers
#############################################################

# Images and containers.
# Image     - blueprint.
# Container - instance of image.

# Get an image with perl inside.
docker run perl perl -E 'say $^V'
#
# Or in 2 steps.
docker pull perl
docker images
docker run <IMAGE_ID> perl -E 'say $^V'
docker run -it perl:5.38-slim perl -E 'say 123'

# Dump the contents of an image.
docker image inspect my-perl

# Copy file to/from a container.
# For config files.
docker cp youthful_brown:/app/.bashrc .

# Assign tag to an image
docker build -t REPO:TAG .
docker build -t node:12 .

cheats.txt  view on Meta::CPAN


# Unset a global config (such as user.name)
git config --global --unset user.name

# Remove all aliases
git config --global --remove-section alias

# Prevent line endings from being converted
git config --global core.autocrlf false

# Warning: Pulling without specifying how to reconcile divergent branches
git config --global pull.ff o


#############################################################
## Git - Folder Configuration Commands (once per local master)
#############################################################

# Create blank repository
git init

# Create blank repository, but in another location
git init --separate-git-dir BACKUP/.git

# Move a git repository to another location and preserving log history (Old Approach)
mv ~SOME_USER/.git BACKUP/.git
cd ~SOME_USER
git --git-dir=BACKUP/.git --work-tree=. init

# Move a git repository to another location and preserving log history (New Approach)
mv ~SOME_USER/.git BACKUP/.git
cd ~SOME_USER
git init --separate-git-dir BACKUP/.git

# Create blank repository, but in another location (alternative)
# .git is a file in this case
echo "gitdir: BACKUP/.git" > .git

# Copy a repository (and place it in the folder my_proj)
git clone <url>

# Copy a repository (and place it in the folder new_proj)
git clone <url> new_proj

# Copy a repository (and place it in the current directory)
git clone <url> .

# Display origin path (GitLab path)
git remote -v

# Diaply more remote information (shows also HEAD branch)
git remote show origin

# Add remote repository (remote is like an alias)
git remote add origin <url>

# Alter remote repository
git remote set-url origin <url>

# Git. Rename remote repository name
git remote rename origin github

# Do NOT ignore a particular file in git
!<file>
!/.gitignore


#############################################################
## Git - Stage Commands
#############################################################

# Add file to the staging area
git add file1

# Add txt files to the staging area
git add '*.txt'

# Use if separate commits modify the same file. Partially stage files
git add -patch

# Add all files in the current directory to the staging area
git add -A .

# Check status of the staging area
git status

# Remove from staging area
git reset file1

# Reset local area to be save as remote repository
git reset --hard github/addsvn

# Unmerge file, reset to a certain commit
git reset --hard bad_commit_id~N

# Remove file
git rm file1

# Remove files ('' to protect from shell interpolation)
git rm '*.txt'

# Remove folder
git rm -r folder1

# Revert untracked changes
git checkout -- *

# Checkout a single file form another branch,
git checkout MY_BRANCH -- MY_FILE

# Remove untracked files and directories
git clean -fd

# Remove untracked files and directories (úsing not standard ignore rules)
git clean -xfd

# Stop tracking a certain file (will NOT remove file, forget)
git rm --cached file1

# Stop tracking a certain directory (will NOT remove directory, forget)
git rm --cached -r directory1

cheats.txt  view on Meta::CPAN

  "invalid" => 1,
  "original" => "First ",
  "phrase" => undef,
  "user" => "First"
}, 'Email::Address::XS' )


#############################################################
## Perl Modules - Email::Outlook::Message
#############################################################

# Parse an outlook message .msg file
perl -MEmail::Outlook::Message -le 'print Email::Outlook::Message->new(shift)->to_email_mime->as_string' "$m"


#############################################################
## Perl Modules - Enbugger
#############################################################

# Using a read,evaluate,print,loop in perl.
# Not updated since 2014 and failing to build.


#############################################################
## Perl Modules - Encode
#############################################################

# Example of using Encode to show string in different supported encodings (broken).
perl -C -MEncode -E '$s1="Ue: Ü"; $s2="Euro: \N{EURO SIGN}"; for ( encodings ) { printf "%-15s: [%-7s] [%s]\n", $_, encode($_,$s1), encode($_,$s2) }'

# Why use Encode?
perl -E 'say "\xe1"'    # �
perl -C -E 'say "\xe1"' # á
perl -MEncode -E 'say encode "UTF-8", "\xe1"' # á
perl -MEncode -E 'use open ":std", ":encoding(UTF-8)"; say "\xe1"' # á
perl -MEncode -E 'use open qw(:std :utf8); say "\xe1"' # á

# Mixed up encoding.
perl -MEncode -E '$s = encode("UTF-8","é", Encode::FB_CROAK|Encode::LEAVE_SRC); say length($s) . " $s"'
4 é
perl -C -MEncode -E '$s = encode("UTF-8","é", Encode::FB_CROAK|Encode::LEAVE_SRC); say length($s) . " $s"'
4 é
perl -Mutf8  -MEncode -E '$s = encode("UTF-8","é", Encode::FB_CROAK|Encode::LEAVE_SRC); say length($s) . " $s"'
2 é
perl -C -Mutf8  -MEncode -E '$s = encode("UTF-8","é", Encode::FB_CROAK|Encode::LEAVE_SRC); say length($s) . " $s"'
2 é

# Decoding example.
perl -C -MEncode -E 'say decode("UTF-8", chr(0xc3).chr(0xa9), Encode::FB_CROAK)'
é


#############################################################
## Perl Modules - Excel::Writer::XLSX
#############################################################

# Excel - Simple: Generate a blank xlsx file
perl -MExcel::Writer::XLSX -E "$wb = Excel::Writer::XLSX->new('my.xlsx'); $wb->close"

# Excel - Simple: Check for errors openning an excel file and write to a cell
# Also rename the worksheet
perl -MExcel::Writer::XLSX -E "$wb = Excel::Writer::XLSX->new('my.xlsx') or die qq($!\n); $ws = $wb->add_worksheet('my'); $ws->write('A1', 'Hello Excel'); $wb->close"

# Excel - Simple: Add a format to make a cell bold
perl -MExcel::Writer::XLSX -E "$wb = Excel::Writer::XLSX->new('my.xlsx') or die qq($!\n); $ws = $wb->add_worksheet('my'); $format = $wb->add_format; $format->set_bold; $ws->write(0, 0, 'Hello Excel', $format); $wb->close"

# Create a spreadsheet/excel with formulas using perl (only on lnxbr42)
perl -MExcel::Writer::XLSX -le '
   $wb=Excel::Writer::XLSX->new("new.xlsx");
   $ws=$wb->add_worksheet;
   $ws->write("A1","In Excel");
   $ws->write("B2",3);
   $ws->write("B3",4);
   $ws->write("B4","=B2+B3");
   $ws->write("B5","=SUM(B2:B4)");
   $wb->close
'

# Create a spreadsheet/excel with color formats using perl (only on lnxbr42)
perl -MExcel::Writer::XLSX -le '
   $wb=Excel::Writer::XLSX->new("new2.xlsx");
   $ws=$wb->add_worksheet;
   $format=$wb->add_format(color => 'red');
   $ws->write("A1","No Color");
   $ws->write("A2","Red Color", $format);
   $wb->close
'

# Create a spreadsheet/excel with color formats using perl (only on lnxbr42). same thing
perl -MExcel::Writer::XLSX -le '
   $wb=Excel::Writer::XLSX->new("new2.xlsx");
   $ws=$wb->add_worksheet;
   $ws->write("A1","No Color");
   $ws->write("A2","Red Color", $wb->add_format(color => 'red'));
   $wb->close
'


#############################################################
## Perl Modules - File::Copy
#############################################################

# Copy using perl
perl -MFile::Copy -lE 'copy("abc2","abc3")'


#############################################################
## Perl Modules - File::Find
#############################################################

# find2perl.pl script.
use File::Find;
use e;
our ($name);
*name  = *File::Find::name;
*find  = *File::Find::find;
find( {
        wanted => sub { say $name if /tri/ },
    },
    '.'
);

cheats.txt  view on Meta::CPAN

sudo chown root:root /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver
#
# Step 4 – Download Required Jar Files:


# Create selenium service
#
sudo cp ~/my/git/srto/selenium/setup/_etc_systemd_system_selenium.service /etc/systemd/system/selenium.service
sudo vi /etc/systemd/system/selenium.service
+ [Unit]
+ Description=Selenium Server
+
+ [Service]
+ EnvironmentFile=-/etc/default/selenium
+ User=<USER>
+ Group=<USER>
+ Environment="PERL5OPT=-d:NYTProf" "NYTPROF='trace=0:start=no:addpid=1:slowops=0'"
+ Environment=DISPLAY=:1
+ ExecStart=/usr/bin/java -Dwebdriver.chrome.driver=/usr/bin/chromedriver -jar /usr/local/lib/selenium/current.jar $SELENIUM_OPTS
+ SuccessExitStatus=143
+
+ [Install]
+ WantedBy=graphical.target

# Selenium service environment file
#
sudo cp ~/my/git/srto/selenium/setup/_etc_default_selenium /etc/default/selenium
sudo vi /etc/default/selenium
+ SELENIUM_OPTS="-role standalone -debug"

# Enable selenium service (runs on login)
sudo systemctl enable selenium.service
sudo systemctl start selenium.service

# Run selenium test using curl (for debug)
curl -X POST http://localhost:4444/wd/hub/session -d '{ "desiredCapabilities": { "browserName": "chrome" } }'
curl -X POST http://localhost:4444/wd/hub/session -d '{ "desiredCapabilities": { "browserName": "firefox" } }'

# Type the Enter/Return key in Selenium.
perl -C -E 'say "\N{U+E007}"'   
perl -C -E 'say "\x{E007}"'     

# Make sure to use the apt firefox and not snap
# when seeing: Firefox profile not missing or not accessible.
sudo snap remove firefox
sudo add-apt-repository ppa:mozillateam/ppa
 echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox


#############################################################
## SQLite3 Database
#############################################################

# Install sqlite on Unix (after in zipping the amalgamation file. make sure these 3 are present:
# shell.c, sqlite3.c, sqlite3.h). rename to a.out to sqlite3
# (database, sqlite3)
gcc shell.c sqlite3.c -lpthread -ldl

# View all the tables in a database (database, sqlite3)
sqlite3 my.db '.tables'

# Turn on column names on query results (database, sqlite3)
sqlite3 my.db '.explain on' 'select * from page_groups'

# Print database structure and data (database, sqlite3)
sqlite3 my.db '.dump'

# View current status/info (database, sqlite3)
sqlite3 my.db '.show'

# REFERENCES and FOREIGN KEYS are (database, sqlite3)
# used to ensure that the tables keys are valid since they
# are found in the foreign table.

# Output the results with a header and evenly spaced columns
sqlite3 my.db --header -column 'select * from my_table'

# Create a new database, table, and data (nathan)
sqlite3 my.db 'create table Users(name,date)'
sqlite3 my.db 'insert into Users values ("bob",20)'
sqlite3 my.db 'insert into Users values ("Joe",25)'
sqlite3 my.db '.explain on' '.width auto' 'select * from Users'

# Case Insensitive Search in SQL query
SELECT ... FROM ... WHERE ... ORDER BY name COLLATE NOCASE ASC LIMIT 5

# Master sqlite table (.tables)
if (table == "") {
    query = m_interface->prepare("SELECT name from sqlite_master");                         // .tables
}
# View the .schema
else if (haveVerbose) {
    query = m_interface->prepare("SELECT sql FROM sqlite_master WHERE name=:table");        // .schema
    query.bind(":table", table);
}
# View the columns
else {
    query = m_interface->prepare("SELECT name FROM PRAGMA_TABLE_INFO(:table)");             // column names
    query.bind(":table", table);

# Get all columns names from SQLite
sqlite3 my.db "PRAGMA table_info(myTable)"
#
sqlite3 my.db "SELECT name FROM pragma_table_info('myTable') ORDER BY name"

# Provide default for null values using COALESCE (sqlite3)
SELECT DISTINCT COALESCE(col,'NULL') FROM myTable ORDER BY col ASC

# SQLite if/else, concat(merge) columns(strings)
SELECT   name,
		 CASE WHEN var1 = 1 THEN 'x'  ELSE '-'  END ||
		 CASE WHEN var2 = 1 THEN '/x' ELSE '/-' END ||
		 CASE WHEN var3 = 1 THEN '/x' ELSE '/-' END ||
		 CASE WHEN var4 = 1 THEN '/x' ELSE '/-' END
		 AS var

cheats.txt  view on Meta::CPAN

#############################################################
## Ubuntu - Power
#############################################################

# Change Ubuntu from suspending when the lid is closed.
sudo vi /etc/systemd/logind.conf
#
# Do nothing (plus uncomment)
HandleLidSwitch=ignore
#
# Suspend
HandleLidSwitch=suspend
#
# Restart system daemon
sudo systemctl daemon-reload

# Check the battery charging threshold on Linux (Ubuntu)
cat /sys/class/power_supply/BAT0/charge_st*

# Ubuntu prevent auto suspend when closing the lid.
# Check default:
gsettings get org.gnome.settings-daemon.plugins.power lid-close-battery-action  # 'suspend'
gsettings get org.gnome.settings-daemon.plugins.power lid-close-ac-action       # 'suspend'
#
# Change default:
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action nothing
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action      nothing
#
# Didnt WORK!

# Ubuntu prevent auto suspend when closing the lid.
sudo apt install gnome-tweaks
# Start Tweaks -> General


#############################################################
## Ubuntu - X-Server
#############################################################

# On Ubuntu there are 2 X-Servers available during login:
   - Wayland
   - Xorg
# Wayland is newer and to use screen sharing (share,jitsi) in
   chrome enable this:
chrome://flags/#enable-webrtc-pipewire-capturer
# Xorg should be avoided since it can cause a black screen on lock screen
   (at least if an extra monitor is connected).


#############################################################
## Ubuntu - Desktop/Tasklist App
#############################################################

# Sample .desktop file to add xair as a favorite program.
cat xair.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=XAIR
# If file name is to be renamed, also probably need to update this class,
# (as is done now).
# Run:
#   xprop WM_CLASS      # WM_CLASS(STRING) = "X-AIR-Edit", "X-AIR-Edit"
StartupWMClass=X-AIR-Edit
Exec=/home/tim/git/xair/software/latest/RUN.sh
Icon=/home/tim/git/xair/software/latest/xair.png


#############################################################
## VBA Regex
#############################################################

# Regex for validating input on database
cat data | add_color -r '(?x) ^ (?! ^( (ALLENGINES|ASAPPLICABLE|PW\d+\w+-?\w+)(,|$))+ ((Except:)? (\d{6}-\d{6}|\d{6}) (,|$) )* $ ) .*'


#############################################################
## Vim Strings
#############################################################

# Example of using a multiline string in Vim
#
+ " Perl Data Dumper and other useful features all in one mapping.
+ function PerlDev()
+    let l:PERL_DEV = "
+       \\nuse v5.32;
+       \\nuse Mojo::Util qw(dumper);
+       \\nuse Carp       qw( croak confess carp cluck );
+       \\nsub WhoAmI { say '--> ' . (caller(1))[3] }
+       \\nsay 'var: ', dumper $var;
+       \\n$Self->HandleException('message'); # New    - Test/*
+       \\n$Selenium->HandleError('message'); # Legacy - script/*
+       \\n
+       \\n"
+
+    put =l:PERL_DEV
+ endfunction
+
+ nnoremap <leader>r :call PerlDev()<CR>


#############################################################
## Vim Quitting
#############################################################

# Exit, saving changes (Vim)
:x

# Exit as long as there have been no changes (Vim)
:q

# Exit and save changes if any have been made (Vim)
ZZ

# Exit and ignore any changes (Vim)
:q!


#############################################################
## Vim Variables

cheats.txt  view on Meta::CPAN

# Registry file location on windows 10
C:\Users\<USER>\NTUSER.DAT

# Script to update the windows registry
#
@echo off
echo.
cd ..
reg add HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MY_PATH /t REG_SZ /v AppPath /d %cd% /f
echo.
echo AppPath = %cd%
echo.
pause

# Dump windows 10 registry to a file (query,view,search)
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MY_PATH" my.reg
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MY_PATH" my.reg /y

# Enable Restore Points in Windows 10
Win + r
Type: regedit
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore
Double - Click "DisableSR"
1	- Disabled
0	- Enabled
#
# Restart PC for changes to take effect.

# Add the "Open command window here" option back to windows 10 commamd prompt (registry,DOS)
# when doing right click.
#
# Go to the regestry
Win + r
type: regedit
#
# For these paths:
Computer\HKEY_CLASSES_ROOT\Directory\shell\cmd
Computer\HKEY_CLASSES_ROOT\Directory\background\shell\cmd
#
# Update permissions:
	- Right-click the PowerShell (folder) key, and click Permissions.
	- Click the Advanced button.
	- On "Advanced Security Settings," click the Change link next to "Owner".
	- Type your account name in the provided field, click Check Names to verify
		you're typing the account name correctly, and click OK.
	- Check the Replace owner on subcontainers and objects option.
	- Click Apply.
	- Click OK.
	- On "Permissions," select the Administrators group.
	- Under "Permissions for Administrators," select Allow for the Full Control option.
	- Click Apply.
	- Click OK.
#
# Show option:
	- Inside the cmd (folder) key, right-click the HideBasedOnVelocityId DWORD,
		and click Rename.
	- Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId,
		and press Enter.
#
# Hide option (undo the change):
	- rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId


#############################################################
## Windows - Variables
#############################################################

# Get windows script directory (DOS,pwd,windows vars)
echo %~dp0

# Start in currect script directory (windows vars)
cd /d %~dp0


#############################################################
## Windows Commands - ipconfig
#############################################################

# Internet not working on Windows
# Disable all adapters, but Ethernet 2.
# Then:
ipconfig /renew
ipconfig /release
# Enable the adapters again.


#############################################################
## Windows Commands - net
#############################################################

# See which folders are being shared on windows 10
net share


#############################################################
## Windows Commands - netstat
#############################################################

# Special Addresses
netstat -ano -p tcp | findstr 8080
# Address 0.0.0.0   allows access by another machine.
# Address 127.0.0.1 allows faking a server by using the loopback adapter.


#############################################################
## Windows Commands - putty
#############################################################

# Launch all benches and watch the date (Putty,xterm)
#
# @REM='
# @echo off
# mode CON: COLS=120 LINES=30
#
# set file=H:/kog.dat
# perl -lE "$f='%file%'; -e $f and exit; print qq(Enter your password: ); chomp($p=<STDIN>); open FH, qq(>$f); print FH $p; system qq(attrib +h $f) "
# set /P pass=< %file%
#
# echo Opening Exceed
# start /B "Exceed" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Open Text Exceed 14 x64\Exceed.lnk"
#



( run in 1.460 second using v1.01-cache-2.11-cpan-a5162978ef8 )