Notes
Recent Notes
Connect to remote graphical desktop sessions over the network using RDP
making a .desktop file with a proper icon for AppImage apps like FreeCAD so they don’t all show the same cog icon in the dock
saving project specific tmux layouts as tmuxp yaml files, and a bash command that loads the right layout or a default one for each directory
SSHing from my Mac into Ubuntu over Tailscale, with ufw set to deny all incoming and only allow connections on the tailscale0 interface.
setting up x11vnc on Armbian so i can remotely control the Orange Pi running my dashboard monitor, including a systemd service to start it at boot.
flashing Armbian to a microSD card for my Orange Pi Plus 2 with USBImager, moving the install to eMMC, backing it up and fixing what broke after.
Convert filename to a slug that can be used inside a URL. Replace spaces with dashes, convert characters to lowercase and remove file extension. Insert slug values inside Sublime Text with a snippet
Amazon Web Services (AWS)
Android
APIs
Armbian
- Add Monitor Profile
- Armbian / Orange Pi Plus 2 - getting started issues
- Date Time troubleshooting on Armbian
- Install Armbian on Orange Pi+ 2
- Install VNC server on Armbian
- Install WebTorrent Desktop on Armbian (OrangePi Plus2 / RaspberryPi 3)
- Pairing Bluetooth devices in Armbian, Orange Pi Plus2
- Screen recording on Armbian
- Setting up Vim and Tmux
- Setup Orange Pi Plus 2 (Armbian) as a network attached storage (NAS)
Bash Scripting
- Append to a dconf list and avoiding duplicates with existing entries
- Associative Arrays in Bash
- Bash script to create a new Jekyll post
- Bash script to create Media Queries with Sass
- Bash script to create OCMOD and vQmod templates with a single command
- Bash script to install a LAMP stack
- Bash Scripts - Load/Read/Include Settings from Another File
- Batch rename filenames to snake_case
- Batch renaming files in Bash
- Check if a program is installed
- Checking operating system in a bash script and installing different programs
- Directly run bash scripts in Github Gists locally in Terminal.
- Here Documents in Bash
- How to create a man page for your Bash Script
- How to take options for your Bash Script
- Opencart Install Script
- OSTYPE in Shell
- Practical examples of install scripts written in Bash
- Reading multiple lines of input from Bash terminal
- Upgrade to Bash 4 on macOS
- Write a Bash Function to Create a gruntfile.js for your project
Cheatsheets
Commands
- [chmod] Permissions
- [df] Disk Free
- [du] Disk Space Usage
- [gcp --parents] Copy selected files and recreate folder structure
- [grep, sed] Find and Replace string in multiple files
- [grep] Find and Delete files based on string
- [wget] How to store an entire website offline
- Copy contents to clipboard form command line (Ubuntu, macOS)
- Devil's Commands
CSS & Sass
- Advanced CSS Tips
- CSS Style Notes
- CSS variables (custom properties) vs. Sass variables
- Getting started with CSS Flexbox
- Hands-on with CSS Grid Layout
- How to create a Grid system in Sass
- Issues with making mobile screens take full height `100vh`
- Justifying items to the right in Flexbox
- Making a site presentable in 7 lines of code
- Sass - Mixins vs. Extend
- Sass - Beginner to Advanced in 30 Minutes
- Sass Function to Auto-Convert Pixels to Ems
- Styling checkboxes and radio
Databases
- Allowing remote access to MySQL
- Automated MySQL Backups to Amazon S3 with AutoMySQLBackups
- Backing up and Restoring Databases
- Common MySQL Errors
- Connect to MySQL installed by MAMP via Command Line (Terminal)
- Enable logs (general, error, slow query) for Amazon RDS databases (MySQL, MariaDB)
- Find out MySQL Database sizes
- Finding slow MySQL queries
- Getting started with Firebase Hosting
- Getting started with PostgreSQL on Ubuntu
- How to add a WordPress Admin user via PhpMyAdmin
- Notes on Moving from MySQL to MariaDB and Replication
- Notes on Moving Large Databases
- OpenCart: Bulk Update Customer Group via phpmyadmin
- OpenCart: Bulk update prices of Products
- OpenCart: Delete Multi-Store and Move Everything to the Default Store
- Referencing data from multiple tables using JOINs
- Reset MySQL root password on Linux
- Search for characters in SQL with LIKE and CONTAIN
- Secure MySQL installation non-interactively with a bash script
- Tips for Querying a MySQL Database
- Update WordPress posts for SSL https
DevOps
- 14 days of DevOps
- Azure DevOps Getting Started
- Bitbucket Pipelines: Overview and Notes
- Continuous Deployment for React Native app to Expo using Bitbucket Pipelines
- Deploy a .NET Core API to AWS Elastic Beanstalk using Bitbucket Pipelines
- Deploy to separate Expo release channels based on Bitbucket feature branches
- Doing automated Git Flow branch deploys on their own Expo release channels with Bitbucket Pipelines
- Install Embedded Dart Sass on Netlify
- Notes on Bitbucket Pipelines
- Setting up a sudo User with SSH key access an Azure Virtual Machine (Ubuntu)
- Trigger a Netlify build when a Github repo is updated
Docker
Expo
- Building Standalone Expo React Native apps locally with Turtle CLI
- Changing from Expo generated Android keystore to your own
- Ejecting from Expo
- Environment variables in Expo using Release Channels
- Expo builds vs. Turtle builds
- Expo keystore invalid format error
- Firebase Crashlytics and Expo
- Handling permissions in Expo
- Integrating Sentry with Expo
- Project structure - Expo vs. React Native
- Setup a publish, build and distribute pipeline for Expo based React Native project
Fastlane
Firebase
Gatsby
Git & Github
- Add git info to Bash prompt
- Clone and Push all branches
- Common Git/Github Errors
- Convert commits to branches and bring back reverted changes with cherry-pick
- Delete files forever from a git repo on Github or Bitbucket
- Git ignore ALL caches
- Git in Production
- Gitflow
- Ignoring files and folders in Git
- move master branch from one repo as the master branch to another repo, without merging
- Replace and overwrite branches in Git
- Size differences between `git clone`, `git clone --mirror` and `git clone --depth 1`
Go
Hardware
Hugo
- Add author profiles to blog posts on Hugo websites
- Auto compiling Sass and SCSS in Hugo
- Customizing Chroma in Hugo and Light/Dark syntax highlighting themes
- Hugo assets directory
- Hugo Config Directories
- Hugo Modules
- Load content from a github repo for a hugo website as a module
- Targeting a template for Hugo website content pages
- Using PrismJS for Hugo sites
iOS
JavaScript
- [ES2015] Arrow Functions
- [ES2015] Default values
- [ES2015] Generators
- [ES2015] Promises
- Array.reduce()
- ES6 (ES2015) and Beyond with Node.js
- ES6 Classes vs. Constructor Functions
- Flow basics
- Formatting and validating dates in JavaScript
- Functional Composition
- Intro to Immutable.js
- Iterables and Iterators
- jQuery and AJAX
- Modules
- Notes on creating a Chrome extension
- Notes on handling clicks and taps on iOS devices and touch enabled mobile browsers
- Notes on using libphonenumber-js for mobile phone number validation and formatting
- Pro tip: Pass an object as function params and use destructuring
- Prototypal Inheritance and Constructor Functions
- Prototypal Inheritance in JavaScript with code examples
- RequireJS in 2021
- Set `npm init` defaults globally
- Show a countdown timer and enable button after the time is up (plain JavaScript)
- Timezone Notes
- Using environment variables with .env
- Using Gatsby with the WordPress API
- Working with APIs using AJAX and JSON
Jekyll
Linux
- [Bash] Bash PATH Environment Variable
- [modprobe, lsmod, insmod, rmmod] List, Add, Remove Kernel Modules
- Add missing Monitor Resolution profile
- Add SSH Key to MacOS Keychain permanently
- Coloring the Mac Terminal
- Command line color settings (GNU)
- Configuring WIFI via Command Line
- Crontab Basics
- Editing Apache Configuration on a cPanel/CentOS Server
- Enable macOS like touchpad gestures on Ubuntu
- FHS, File System Architecture and Directory Structure
- Generating an SSH Key and Copying it to Remote Server
- Getting WiFi details in Linux
- How to Install Git on CentOS
- How to install Node.js on CentOS/cPanel
- Image Optimization on a Linux server
- Install Ruby on Ubuntu
- Linux Disk File Systems (ext2, ext3, Reiser, ext4)
- Nagios
- Run JNLP Files on Ubuntu
- Setting up shared network between Ubuntu and Mac using Samba
- SSH Keys
- SSH Tunneling / Port Forwarding
- Unix: Pranks that sysadmins play
- Unix: Using pushd and popd for faster navigation
- Yum Transaction Check Errors & Dependencies/Package Conflicts
macOS
Misc.
- <p lang='ur' dir='rtl'>آؤ اردو میں تحریر کریں</p>
- Conditional formatting in Google Sheets
- Creating a WordPress Shortcode
- Decisions on libraries and framework
- Download audio from YouTube with youtube-dl
- fileconveyer
- Get current URL in C# MVC (.cshtml) files
- MacBook Pro - Apple Silicon M1 experience
- Mobile codes to check SIM status for Pakistani networks
- Named destination in PDF on Linux
- OBS Studio
- Orange Pi+ 2 - Getting started and headaches
- Steganogrophy
- Things that i love about my Mac
- Why a MacBook (and the Apple ecosystem)
- Youtube-dl on macOS
- yt-dlp install on Ubuntu 22.04
Node
Node API
OpenCart
- Dynamically adding Scripts, Stylesheets, and Links to a Template
- Enable SSL in OpenCart
- Fixing OpenCart Internal Server Error
- Getting started with Controllers
- Getting started with OpenCart API
- Hide Menu Item/Link If User does not have Permission - OpenCart 2.1.0.2
- How to create a very basic OpenCart Module in less than 5 minutes
- How to get and show Information pages in OpenCart
- How to get and show Manufacturers in OpenCart
- Installing OpenCart 3.0.3.2 on Ubuntu 18.04 LTS
- Lessons in transferring from OpenCart to Shopify
- Misc. OpenCart Snippets
- Opencart Architecture
- The Ultimate Guide to Creating OpenCart Modules
- Upgrade from OpenCart 2.1.0.2 to 2.3.0.2
- Upgrade OpenCart Extensions from 2.1x to 2.3x/3x
- Upgrading OpenCart Extensions
Personal
- C# - 30 Day Code Challenge
- How i got this blog site up with Gatsby
- How much data do i need?
- Imposter syndrome fades away
- Logitech G512 Carbon vs. GMMK TKL
- My first mechanical keyboard
- Notes on building a custom mechanical keyboard
- Notes on The Creative Brain
- Notes on ukulele strings
- Postman is awesome because
- Ukulele Notes
- Working from Home during the COVID-19 Social Isolation
PHP
Programming
Python
Raspberry Pi
React Native & Expo
- Animating SVG in React Native
- Beta testing your React Native app
- Creating a Docker image for React Native, Android and Fastlane
- Creating a placeholder loading Component in React Native using Animated
- Custom fonts in React Native
- Debugging Redux State in React Native
- notes on SafeAreaView in React Native
- Opening React Native Debugger automatically on the correct port
- Passing params to React Navigation Header in Functional Components
- React Native - Getting Started
- React Native tips
- Setting up an M1 MacBook Pro for React Native (iOS and Android)
- Setting up multiple environments in React Native in a cross-platform way and use variables in JS, Android and iOS projects
- Setting up React Native development environment on Linux Ubuntu 20.04
- Setup dev environment for React Native CLI (macOS / Ubuntu)
- Signing your React Native app for Android with Google Play App Signing
- Styling the StatusBar in React Native, Expo and React Navigation
- Time it taskes to setup a Recat Native project
- Troubleshooting and Debugging React Native
ReactJS
- .NET Core SignalR with React Native
- Adding a Custom Endpoint to WordPress
- Automatically sort import statements in React projects
- Convert Create React App project to Vite
- Custom Path mapping (i.e. absolute imports) in React and React Native
- Data States
- Generic Props in React and TypeScript to get rid of Children being Implicitly Any
- Getting data IN
- Getting started with React Context
- Implementing SVG icons in React
- Integrating Sentry with a React Native app built using Expo
- JS for React
- Notes on responsive screen dimensions in React Native
- Notes on state management in React Apps
- Notes on SWR
- React Context and useContext in Functional Components
- React Native with Prettier, Typescript, ESLint and Expo
- React Router push link
- Responsive SVGs in React
- SVG Icon System in React
- Theming styled-components in React
- WordPress API - send post details with comments data
Redux
Serverless
System Administration
- Add CORS Header to an ASP.NET MVC project
- Add Tor browser on Ubuntu
- Add Tor project repo to Ubuntu
- Aliases in PowerShell
- Automating the updating of GeoLocation database (GeoIP2 by MaxMind)
- Change Swap partition in Ubuntu
- Configure SFTP
- Configure WiFi from command line (Ubuntu 18.04)
- Configuring networking interfaces
- Connect from macOS to Ubuntu remote desktop using xfreerdp and GNOME Remote Desktop
- Connect to Ubuntu from macOS securely over Tailscale
- cPanel Web Templates and Skeleton Directory
- Create a 'New Document' shortcut in Nautlius File Manager
- Disable Windows Defender permanently with Registry Editor
- Dual booting Windows and Linux
- Enable CORS for WordPress API on Apache
- Enabling pretty permalinks in Bitnami WordPress with SSL
- Fix slow boot after deleting Swap partition
- Get all kinds of information about your Mac machine using the Terminal
- Getting started with WebP on Ubuntu
- Image Optimization on Linux Servers using jpegoptim and optipng
- Increasing performance on low-RAM
- Install Firefox Nightly on Ubuntu Linux 18.04
- Install GoDaddy SSL Certificate on Apache
- Install ionCube Loader on Ubuntu 16.04
- Install latest SML/NJ from source on Ubuntu (20.04)
- Install multiple Java versions and switch between them
- Install multiple Java versions and switch between them on macOS and Ubuntu
- Install PHP5 on Ubuntu 17.04 Zesty Zapus
- Install sedutil on Ubuntu
- Install Standard ML of New Jersey (SML/NJ) on M1 Apple Silicon Macs (macOS Monterey)
- Installing Watchman on Ubuntu Linux
- Intro to debconf
- Intro to Rootkit Hunter
- Making sense of Bitnami Apache confs
- Monitoring system resource usage and statistics on Ubuntu
- Mount NTFS drives in Linux
- Move Ubuntu `/home` partition to another one
- nmap
- NTFS read/write on macOS
- Orange Pi NAS
- Orange Pi Plus 2 - System details
- Playing around with an Orange Pi+ 2
- Redirections with .htaccess file
- Resetting an 'Unavailable' Serial Number on a Mac
- Securing Wordpress
- Setting up a frontend dev environment (Debian/Ubuntu)
- Setting up a WordPress Multisite Network in Subfolders
- Setting up an M1 MacBook Pro for Frontend Development
- Setting up an Orange Pi+ 2 for web development
- Setting your Postfix self-hosted mail server up for multiple domains
- SFTP Users for Website directory
- SSH into Windows from Linux
- Stream Audio over WiFi from Linux Ubuntu PC to Android Phone
- Taking care of prompt imputs from a script with Debconf
- The ultimate guide to creating your own Zsh (oh-my-zsh) theme
- Tranfer between Debian Apache based setups
- Troubleshooing a Mac
- Troubleshooting slow boot time on Ubuntu on an NVMe SSD
- Troubleshooting UGREEN Bluetooth 5.4 adapter on Ubuntu Linux
- Upgrade Gigabyte BIOS [H370M HD3 (rev. 1.0)]
- Use rsync to mirror websites
Typescript
Ubuntu
- Change default screenshot save location for gnome-screenshot on Ubuntu
- Change forgotten Ubuntu password inside WSL
- Create desktop icon for AppImage files
- dconf and gsettings notes
- How to add an application launcher shortcut in Ubuntu Linux
- Making the Logitech Unifying Receiver work on Ubuntu Linux with an MX Master 3 mouse
- Mount an NTFS partition on Ubuntu with specific owner, group and permissions
- Reload /etc/fstab entries and mount drives
- Reset password on Ubuntu
- The Ultimate Guide to creating a Gnome Terminal theme
- Troubleshooting HP Printer on Ubuntu 2104
- Trying Awesome window manager on Ubuntu
Web Development
- Color coding VS code windows
- Creating and using webp images
- Creating WordPress shortcodes
- Define a clickable interactive map over an image with <map>
- Drawing SVGs
- Drawing with SVG paths and demystifying the code
- Durandal Notes
- Gatsby in a day
- Generating Hugo templates for subsections
- How to make websites in Urdu and use custom fonts
- HTTPS Secure Server with SSL for local development
- Hugo Snippets
- Hugo Templates in 15 Minutes
- KnockoutJS
- Moving from Jekyll to Hugo
- Multiple SSH Keys and Azure DevOps
- Notes on PWAs and app manifests
- Notes on SVG Sprites
- Notes on transpiling and compile targets
- Page Speed Optimizations
- Parcel
- Regex
- Surge deployments in 2 minutes
- SVG Sprites
- Three ways of determining the user's country inside the browser (Geolocation API, IP address, Timezone)
WordPress
Workflow
- Case-insesnitive tab auto-complete in the Terminal
- Create a sublime text snippet to insert a slug
- Create Grunt Snippets in Sublime Text
- Customizing Geany colorschemes and syntax highlighting
- Customizing tmux
- Customizing Vim
- How to create a Snippet in Sublime Text
- My Gruntfile.js
- Open Files in New Tab by Default in Sublime Text 3
- Productivity Notes
- Save project specific tmux layouts with tmuxp
- Screenshot shortcuts on macOS, Linux and Windows
- Set up a new macOS machine with Homebrew-Cask
- Setting up a dev environment on macOS
- Text/Code Editor Showdown
- The best of tiling window managers for Windows, macOS and Linux
- Troubleshooting MAMP
- Using workspaces like a pro in Ubuntu
- Workspaces in Windows
- Writing a Grunt Task for Website Speed Optimization