Archive

Archive for the ‘Interesting’ Category

Remapping PgUp and PgDn Keys

May 8, 2019 Leave a comment

Problem:
PgDn/PgUp keys are too close to Left, Right arrow keys. They end up getting pressed unintentionally.

Solution:
Remap PgDn and PgUp to right and left arrow keys respectively.

Added this to the end of my .zshrc file.
# Disable pgdwn and pgup. Make the map to the arrow keys instead.
/usr/bin/xmodmap -e "keycode 112 = Left"
/usr/bin/xmodmap -e "keycode 117 = Right"

Source:
https://stackoverflow.com/questions/46316946/dell-xps-9395-disable-pgup-pgdwn-keys
https://askubuntu.com/questions/296155/how-can-i-remap-keyboard-keys

Advertisements
Categories: Interesting Tags: , , , ,

Chamois – The big botnet you didn’t hear about

May 7, 2019 Leave a comment

SINGAPORE—The Android security team announcing that it had eradicated the Chamois malware family from Google Play in March 2017, turned out to be Android’s “Mission Accomplished” moment. Version 3 of Chamois surfaced in January 2018, more sophisticated and virulent than previous versions, followed by version 4 a few months later.

Apps containing code associated with the Chamois malware family first surfaced on Google Play in August 2016, followed by version 2 in November 2016. At its peak, in March 2018, Chamois had infected 20.8 million devices, Android security engineer Maddie Stone said at the Kaspersky Security Analyst Summit. Infected devices were commandeered into a botnet, and received instructions from a remote command-and-control server.

The Android team has successfully chipped away at that number in the year since, and in March, there were fewer than 2 million infections.

Chamois was “the biggest botnet you’d never heard of,” Stone said.

Early versions of Chamois masqueraded as benign apps and tricked users into downloading the apps on to their devices, but Google Play’s scanning tools became more efficient and effective at recognizing and blocking Chamois. Later versions of Chamois switched tactics and tricked app developers and device manufacturers into incorporating the code directly into their apps, making it possible for these tainted apps to appear on Google Play, Stone said.

https://duo.com/decipher/chamois-the-big-botnet-you-didnt-hear-about

Categories: Interesting Tags: ,

Think Like (a) Git — a guide for the perplexed

April 23, 2019 1 comment

GIT Shouldn’t Be So Hard to Learn.

When you’re just getting started, something as straightforward as a merge can be terrifying. It can take a long time to really become comfortable using some of Git’s more advanced features. (It took me a year or two.)

Once people achieve some level of Git enlightenment, they tend to make statements of the form ‘Git gets a lot easier once you realize X’ — but that doesn’t do much for people staring up Git’s steep learning curve.

My goal with this site is to help you, Dear Reader, understand what those smug bastards are talking about.

Let’s get started, shall we?

http://think-like-a-git.net/

Categories: Interesting

A SQLAlchemy Cheat Sheet

April 12, 2019 Leave a comment

Introduction

SQLAlchemy is a deep and powerful thing made up of many layers. This cheat sheet sticks to parts of the ORM (Object Relational Mapper) layer,and aims to be a reference not a tutorial. That said, if you are familiar with SQL then this cheat sheet should get you well on your way to understanding SQLAlchemy.

https://www.codementor.io/sheena/understanding-sqlalchemy-cheat-sheet-du107lawl

Categories: Interesting Tags:

https://techdevguide.withgoogle.com/

April 4, 2019 Leave a comment

Whether you’re a student, an educator, or otherwise interested in software engineering, newer to computer science or a more experienced coder, we hope there’s something for you here in Google’s Guide to Technical Development

https://techdevguide.withgoogle.com/

Categories: Interesting

Beginner’s Guide to Using Databases with Python: Postgres, SQLAlchemy, and Alembic

March 27, 2019 Leave a comment

Using Docker for Flask Application Development

March 2, 2019 Leave a comment

Introduction

I’ve been using Docker for my staging and production environments, but I’ve recently figured out how to make Docker work for my development environment as well.

When I work on my personal web applications, I have three environments:

* Production – the actual application that serves the users
* Staging – a replica of the production environment on my laptop
* Development – the environment where I write source code, unit/integration test, debug, integrate, etc.

While having a development environment that is significantly different (ie. not using Docker) from the staging/production environments is not an issue, I’ve really enjoyed the switch to using Docker for development.

The key aspects that were important to me when deciding to switch to Docker for my development environment were:

* Utilize the Flask development server instead of a production web server (Gunicorn)
* Allow easy access to my database (Postgres)
* Maintain my unit/integration testing capability

This blog post shows how to configure Docker and Docker Compose for creating a development environment that you can easily use on a day-to-day basis for developing a Flask application.

For reference, my Flask project that is the basis for this blog post can be found on GitLab.

https://www.patricksoftwareblog.com/using-docker-for-flask-application-development-not-just-production/

Categories: Interesting