Sunday, April 24, 2022

Install Windows app without Microsoft Store

  1. search the App from Microsoft Store https://www.microsoft.com/en-us/store/apps/windows
  2. copy the app's url to https://store.rg-adguard.net
  3. download the .appxbundle from the list
  4. From powershell admin, run: Add-AppxPackage .\app-filename.appxbundle

Friday, January 12, 2018

AWS fix for Meltdown and Spectre not compatible w/ Centos6 official patch

https://forums.aws.amazon.com/thread.jspa?messageID=823033

Recently published Red Hat/CentOS kernel version - kernel-2.6.32-696.18.7.el6.x86_64 is failing to boot on a para virtual instance. This is a known issues which is under investigation with Redhat. Happen to CentOS 4, 6 etc. The workaround changing grub configuration to boot to previous kernel. grub.conf says "default=0" so it is booting the newest kernel on the first entry in the file. If I could easily override this from within the web interface for AWS EC2 and tell it to boot the next entry i.e. the equivalent of "default=1" or similar
There's a problem with this workaround when using the old official centos images since they have a product code and as such when trying to mount it on another machine we get the following error:
"Error attaching volume: The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems."  the fix I used was to build a specific editing instance using the exact same CentOS image that was used originally for the borked instance. https://aws.amazon.com/marketplace/library/



Monday, November 27, 2017

write protection usb

http://usb-fix.blogspot.com/
http://www.rmprepusb.com/tutorials/repair-your-usb-flash-drive
upantool.com

  • Find the manufacture of the controller by looking up VID / PID information, using by using Flash Drive Information Extractor or ChipGenius.
  • Get the manufacture utility (Mass Production Tool, MPTools) to erase the usb.



Tuesday, November 14, 2017

Linux Distro


Lubuntu is a nice alternative. It is based on the LXDE environment which aims to be lightweight. It's a great disto (short for distribution) for old systems (not ancient systems) as it aims to keep the impact on your system low.

Linux Mint was designed to provide a complete experience right out of the box without having to download additional packages after installing the OS. Personally I found it lighter weight than Ubuntu in the past and a crisper interface. It's a nice fit between Ubuntu and Lubuntu.

LXLE vs Lubuntu
LXDE eXtra Luxury Edition 14.04 (old name Lubuntu eXtra Life Extension)
In a nutshell, LXLE is literally stock Lubuntu LTS (Long Term Support), with:
  • about 2 dozen preconfigured PPAs for specific add-on applications, and
  • some different choices for default theme and preinstalled applications,
    • extendet PCManFM (now let open files and directories with root permissions, easier changing file names, copying directories, emptying bin with one click)
    • shortcuts for system menu, terminal and launching panel
    • after run LXLE there are 4 options for imitation interfeces from Win XP, OS X, Gnome2 and Unity, and configuration for netbooks with small screens
    • xArchiver repaced by FileRoller
    • Gpicview replaced by Mirage (light, with scale and crop functions)
    • Ubuntu One cloud replaced by Bittorrent Sync
    • Samba Client replaced by Gigolo
---
For me, the two most significant differences are:
  • LXLE track LTS instead of mainline Ubuntu. On the one hand, I'd get to avoid the Big End-of-Life Update for a lot longer (5 years vs. 9 months). On the other hand, packages aren't as current as on mainline, to avoid potential package version jumps that turn out to be showstoppers. For instance, PostgreSQL is already on 9.4 with Lubuntu 15.04, but stuck on 9.3 with LXLE 14.04.2.
  • LXLE is a "boutique" distro. While the underpinnings (Lubuntu) are well-supported, there are enough additions and tweaks that if the LXLE creators decided to cease operations tomorrow, there's a good chance that I'd have to do a fresh Lubuntu install to continue moving forward.

Friday, September 29, 2017

AWS notes


Blogs:

AWS docs:



You create an AMI from an "instance" and a snapshot from a "volume". You can create a snapshot of any EBS volume at any time, and the running state of the machine will never be affected. All caveats about a snapshot of an active volume apply.

When I create AMIs from my Windows instances they are always restarted; I'm not sure why that is so. They do not seem to be "stopped" then "started" since I never lose the Elastic IP association to the instance. I have read, though I have no personal experience, that Linux instances are NOT restarted during AMI creation.

There are a couple different methods of backing up instance data. Snapshotting EBS volumes will not reboot an instance or make it inaccessible. That being said, while the snapshot is in progress it is possible to notice performance degradation. We typically recommend customers stop doing read/writes (especially database read/writes) to a volume while it is being snapshotted to ensure data consistence. Details on creating an EBS snapshot are available here: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html

Another option is to create an EBS AMI. An AMI (Amazon Machine Image) by default will snapshot all attached EBS volumes and create a "one click" method of launching new instances. This process WILL reboot the instance. It is possible if you are using the CLI, to leverage the --no reboot flag. Though this isn't recommended, it is an option. Further details on creating an EBS AMI are available here: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/Tutorial_CreateImage.html
========
Get Screenshots of console: EC2 console https://console.aws.amazon.com/ec2/.
  1. Left Navigation Pane, choose Instances
  2. Select instance
  3. Actions - > Instance Settings -> Get Instance Screenshot
Create snapshot of EC2:

  1. AWS EC2 console -> INSTANCES -> Instances
  2. From the instance property in lower right panel, click on the "Root device" name and write down the EBS ID, "vol-..."
  3. WS EC2 console -> ELASTIC BLOCK STORE -> Snapshots -> Create Snapshot, fill in the form with EBS ID
Restore snapshot:
  1. create volume from snapshot
  2. if root vol, detach the old volume. Attach the new vol as /dev/sda1




====
Storage: EC2 Instance Store, EBS, EFS, S3


AWS Storage Overview

Amazon Simple Storage Service
(Amazon S3)
A service that provides scalable and highly durable object storage in the cloud.
Amazon Glacier A service that provides low-cost highly durable archive storage in the cloud.
Amazon Elastic File System
(Amazon EFS)
A service that provides scalable network file storage for Amazon EC2 instances.
Amazon Elastic Block Store
(Amazon EBS)
A service that provides block storage volumes for Amazon EC2 instances.
Amazon EC2 Instance Storage Temporary block storage volumes for Amazon EC2 instances.
AWS Storage Gateway An on-premises storage appliance that integrates with cloud storage.
AWS Snowball A service that transports large amounts of data to and from the cloud.
Amazon CloudFront A service that provides a global content delivery network (CDN).

Storage Need
Solution
AWS Services
File system
Amazon S3 uses a flat namespace and isn’t meant to serve as a standalone, POSIX-compliant file system. Instead, consider using Amazon EFS as a file system.
Amazon EFS
Structured data with query
Amazon S3 doesn’t offer query capabilities to retrieve specific objects. When you use Amazon S3 you need to know the exact bucket name and key for the files you want to retrieve from the service. Amazon S3 can’t be used as a database or search engine by itself. Instead, you can pair Amazon S3 with Amazon DynamoDB, Amazon CloudSearch, or Amazon Relational Database Service (Amazon RDS) to index and query metadata about Amazon S3 buckets and objects.
Amazon DynamoDB Amazon RDS Amazon CloudSearch
Rapidly changing data
Data that must be updated very frequently might be better served by storage solutions that take into account read and write latencies, such as Amazon EBS volumes, Amazon RDS, Amazon DynamoDB, Amazon EFS, or relational databases running on Amazon EC2.
Amazon EBS
Amazon EFS Amazon DynamoDB Amazon RDS
Amazon EC2
Archival data
Data that requires encrypted archival storage with infrequent read access with a long recovery time objective (RTO) can be stored in Amazon Glacier more cost-effectively.
Amazon Glacier
Dynamic website hosting
Although Amazon S3 is ideal for static content websites, dynamic websites that depend on database interaction or use server-side scripting should be hosted on Amazon EC2 or Amazon EFS.
Amazon EC2
Amazon EFS
Immediate access
Data stored in Amazon Glacier is not available immediately. Retrieval jobs typically require 3–5 hours to complete, so if you need immediate access to your object data, Amazon S3 is a better choice.
Amazon S3

Relational database storage
In most cases, relational databases require storage that is mounted, accessed, and locked by a single node (EC2 instance, etc.). When running relational databases on AWS, look at leveraging Amazon RDS or Amazon EC2 with Amazon EBS PIOPS volumes.

In most cases, relational databases require storage that persists beyond the lifetime of a single EC2 instance, making EBS volumes the natural choice.
Amazon RDS Amazon EC2 Amazon EBS
Temporary storage
Consider using local instance store volumes for needs such as scratch disks, buffers, queues, and caches.
Amazon EC2 Local Instance Store
Multi-instance storage
Amazon EBS volumes can only be attached to one EC2 instance at a time. If you need multiple EC2 instances accessing volume data at the same time, consider using Amazon EFS as a file system.
Amazon EFS
Highly durable storage
If you need very highly durable storage, use S3 or Amazon EFS. Amazon S3 Standard storage is designed for 99.999999999 percent (11 nines) annual durability per object. You can even decide to take a snapshot of the EBS volumes. Such a snapshot then gets saved in Amazon S3, thus providing you the durability of Amazon S3. For more information on EBS durability, see the Durability and Availability section. EFS is designed for high durability and high availability, with data stored in multiple Availability Zones within an AWS Region.
Amazon S3
Amazon EFS
Static data or web content
If your data doesn’t change that often, Amazon S3 might represent a more cost-effective and scalable solution for storing this fixed information. Also, web content served out of Amazon EBS requires a web server running on Amazon EC2; in contrast, you can deliver web content directly out of Amazon S3 or from multiple EC2 instances using Amazon EFS.
Amazon S3
Amazon EFS
Relational database storage
In most cases, relational databases require storage that persists beyond the lifetime of a single EC2 instance, making EBS volumes the natural choice.
Amazon EC2 Amazon EBS
Shared storage
Instance store volumes are dedicated to a single EC2 instance and can’t be shared with other systems or users. If you need storage that can be detached from one instance and attached to a different instance, or if you need the ability to share data easily, Amazon EFS, Amazon S3, or Amazon EBS are better choices.
Amazon EFS Amazon S3 Amazon EBS
Snapshots
If you need the convenience, long-term durability, availability, and the ability to share point-in-time disk snapshots, EBS volumes are a better choice.
Amazon EBS

Friday, June 9, 2017

windows kb

  • display printers takes forever
    disable Bluetooth service
  • uninstall windows 10 build in apps
    From powershell as admin
    • Get-AppxPackage -AllUsers
      Remove-AppxPackage PackageFullName
    • Get-AppxPackage *3dbuilder* | Remove-AppxPackage
    • Get-AppxPackage -AllUsers | where-object {$_.name –like “*3DBuilder*”} | Remove-AppxPackage
      Get-appxprovisionedpackage –online | where-object {$_.packagename –like “*3DBuilder*”} | Remove-AppxProvisionedPackage -online
    • Removes everything but Store and App connector:
      Get-AppxPackage -AllUsers | where-object {$_.name -notlike "*Microsoft.WindowsStore*"} | where-object {$_.name -notlike "*Microsoft.Appconnector*"} | Remove-AppxPackage
      
      Get-AppxProvisionedPackage -online | where-object {$_.packagename -notlike "*Microsoft.WindowsStore*"} | where-object {$_.packagename -notlike "*Microsoft.Appconnector*"} | Remove-AppxProvisionedPackage -online
    • that's only hiding the app,to truly remove it use DISM
      DISM /Online /Get-ProvisionedAppxPackages | select-string Packagename
      DISM /Online /Remove-ProvisionedAppxPackage /PackageName:**PACKAGENAME**
      FYI: you can't remove Cortana & Cloud Experience
    • http://winaero.com/blog/stop-windows-10-anniversary-update-from-installing-candy-crush-and-other-unwanted-apps/
  • end

Tuesday, May 9, 2017

OSX tips

 

  • restore from time machine image:
    Hold Command-R while boot
  • Hide user account: https://support.apple.com/en-us/HT203998
    From Admin terminal:
    # sudo dscl . create /Users/hiddenuser IsHidden 1
    
    unhide the account with:
    # sudo dscl . create /Users/hiddenuser IsHidden 0
  • Hide user account from login screen
    sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add user1 user2 user3 user4
    
    Delete hidden list
    sudo defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList
    
  • setup static IP:
    sudo ipconfig set en1 INFORM 192.168.0.150

    Note: for whatever reason, when you are setting the IP address manually via the command line the Mac OS X Network Preferences doesn’t necessarily catch up to the changes.
  • enable vnc
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all
    disable vnc
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off