How to Turn off Twitter Retweets with Python

Alexis Madrigal wrote an article in the Atlantic proposing a new way of helping user to tame their Twitter feeds. Turn off retweets.

I really think that he is on to something and after having tried it for a while, I wanted to code a way of doing this without having to manually go to each user’s profile and turn off all retweets. Fortunately with python we have a pretty quick option.

Continue reading “How to Turn off Twitter Retweets with Python”

Bootstrap 3 and Webpack

My time spent learning Laravel recently has forced me to take a look at webpack. Laravel uses webpack as the frontend tool of choice for compiling javascript and css files. Laravel ships with an abstraction on top of the tool called Laravel Mix that takes care of some of the configuration and makes the process a little easier. Having used it a little bit I became curious about implementing webpack in a couple of smaller projects independently.

I decided to start with something simple–jquery and bootstrap, but quickly found that even something that simple was not as simple as it would appear. After some searching and some comparisons I was able to make something work. I’m going to detail what I found, since I wasn’t able to find a lot out there that was complete and simplified.

Continue reading “Bootstrap 3 and Webpack”

Laravel API Authentication Middleware

Laravel 5.6 has a native API authentication middleware as an alternative to Passport (https://laravel.com/docs/5.6/passport). If you are not running an up-to-date version of PHP on your servers however, you are going to have some difficulties using Password (as I learned the hard way). After doing some digging I ran across an article for versions 5.2 and 5.3 (see link below) which I found still applicable.

Continue reading “Laravel API Authentication Middleware”

Logging Email with Laravel

Laravel provides the Mail facadeĀ (as of version 5.6) which acts as a wrapper around the PHP email library Swift Mailer.

Any application that sends emails needs to have logging for send events. No one wants to go wading through Linux sendmail logs or bothering sysadmins to go through Exchange logs.

Swift Mailer provides a couple of different logging plugins natively. Laravel provides decent documentation around their Mail facade but omit some details. One feature they leave out are Swift Mailer’s plugins and how to access them using the wrapper.

Continue reading “Logging Email with Laravel”

A Temporary Internet

Nothing is certain on the internet.

[updated 4/11/2018 ]

Link rot is a perpetual problem with the internet. We all have experienced plenty of occasions where a promising link turns out to be a ‘404’. There is something of a transient nature about the internet. Items can be moved. Servers crash. Domains are abandoned. Articles are lost. Nothing really is certain.

Another layer of certainty that probably needs to be reviewed is the uncertainty regarding link shortening services. This was highlighted recently by an announcement by Bitly.com that they are going to be retiring their link bundling service. This particular feature has apparently not been an overwhelming hit and the company has decided to retire the service rather than keep it up.

Continue reading “A Temporary Internet”

How to install Java SE Development Kit 7 on Debian

Debian is a wonderful open source distro, but sometimes you need some evil Oracle to get some things going.

Debian is a wonderful “open source” Linux distribution that I have been using for quite some time now. One problem that creeps up every now and then is the whole “open source” thing–frankly sometimes you need proprietary software. Now I hate that and if you know any better you probably do too, but such is the world we live in.

I needed Java SE 7 to try to fix a small problem I had been having with PyCharm. For some reason the “ctl+v” for pasting is not working and I had seen somewhere on a forum that the java version could be causing a problem. I had been using openjdk-7 –and since I don’t do much in java–that really hadn’t been much of an issue. But now it was and Debian does not have the official Oracle version in the repositories–anywhere. (Oracle is evil by the way).

Continue reading “How to install Java SE Development Kit 7 on Debian”

Getting Started With SVG

SVG allows for fantastic scalability and the source code behind the images is actually xml and editable.

SVG is a big deal. It seems to me like its becoming a bigger deal, at least, I’m running into it more often. The trend toward responsive design is probably at the root of this push. SVG allows for fantastic scalability and the source code behind the images is actually xml and editable. I ran into Steven Bradley’s blog vanseodesign.com a few weeks ago and have really profited from his tutorials on SVG. If you’re looking for a good starting point I would recommend you start here and follow along. He has a great writing style and his examples are understandable.

WordPress Social Media Tags Without Plugin

WordPress does great as a Content Management System, but leaves a lot to be desired when it comes to getting ready for Social Media. Google, Facebook, and Twitter all have their own markup schemes which really provide some enhancements to content that is shared on those networks. Getting that markup on WordPress is the challenge. There are plugins that help provide this sort of functionality, but I prefer to keep it simple and I also like to know how it is done. So I rolled up my sleeves and put something together to get the job done.

Continue reading “WordPress Social Media Tags Without Plugin”

Be careful on Github!

This is a mistake I’ve nearly made a couple of times when pushing commits on to GitHub. You are developing in your local environment, giving no thought to security and its time to commit your changes into your GitHub repository.

This is a mistake I’ve nearly made a couple of times when pushing commits on to GitHub. You are developing in your local environment, giving no thought to security and its time to commit your changes into your GitHub repository. Where there any keys in that code? Apparently there is quite a bit of the time and hackers know it. So be careful and develop some good habits even when in your local environment. You can read more about the threat over at programmableweb.com.

Mobile Browsers

Recent years have seen an increase in discussions over native apps and mobile apps. But this is not where our energies need to be spent. Our energies need to be spent with better web browsers and web designs that are friendly for mobile devices whether responsive or mobile-first.

There are two glaring deficiencies (at least!) in the mobile sphere: programmers utilizing web browsers and users demanding decent web browsers. I noticed the issue for the first time this week with a release from the Electronic Freedom Foundation for their new mobile app.

Their app is probably really good. I really like the EFF. The app has an alert system for EFF’s new campaigns. You should probably download it. You should probably donate or at least show some support for the EFF and the work they do. But do they need an app?

Let’s be clear the issue is not EFF or their app. The issue is withe the flood of apps that are being published every year for website after website. I’ve never really cared much for the issue of native vs mobile apps. Each has their supporters and frankly each probably has their own place and strengths–but what about the web page?

Continue reading “Mobile Browsers”