Skip to main content

Posts

Showing posts from February, 2019

Hey Siri, what's my blood sugar? Learning to Code with Apple's iPhone Shortcuts

B ear with me here. Apple Shortcuts (free on the App Store ) is extraordinary and you shouldn't sleep on it. In fact, you should use it and explore it as it's amazing. I would go even further and say it could be a great place to learn to code! Apple Shortcuts on iPhone is a lot like Microsoft Flow , except for your phone. Shortcuts let you string together Actions (ahem, functions) into multi-step tasks (ahem, functions that call functions). There's a rich and growing gallery of shortcuts that you can copy into your local (to your phone) library. You can then name them and invoke your Shortcuts with Siri. Here's a few links to Shortcuts that (assuming you are reading this from your iPhone) you can add to your library with a click! Do Not Disturb Timer Expand URL Intelligent Power (from Reddit ) Check Spelling Convert Video to GIF Download YouTube Video Once you have a shortcut you can invoke it as an item/icon on your springboard/home screen, you can have ...

Running Unikernels from Existing Linux Applications with OPS

Unikernels are an emerging deployment pattern that engineers are choosing over Linux and Docker because of their performance, security and size. Researchers from NEC are reporting boot times in 5ms while other users talk about how small their VMs can get – in the kilobyte range if you’re using c. Still others like OSv have measured up to a 20% performance advantage in popular databases. However they have remained out of a lot of developers reach because of their low level nature. That is until we decided to open source a tool called ops.city (OPS) . OPS is a new free open source tool that allows anyone, including non-developers to instantly build and run unikernels on linux or mac from their existing software. There is no complicated re-compilation. There is no LDFLAG twiddling or random patching of various libraries you’d never patch yourself. OPS goal is to democratize access to unikernels. Ok – enough of that – let’s build some unikernels. First thing you’ll want to do is downloa...

Android Deep Linking Example

In this tutorial you will learn about android deep linking with an example. In deep linking first we have to understand what does an URI means. Let us consider an example of URI, https://www.example.com/demo?userid=100&client=android Here, https is a scheme www.example.com is a host /demo is a path, directing the specific resource ?userid=100&client=android is a query string with key-value pairs like the hashmap in java. Deeplink is defined as a source of content to content web to your android application and in deeplink whenever user opens an URI and if that URI is deep link with any application then it opens a dialog prompt that open with that app or open with browser only. We can create deeplink over network that is connecting website directly to the application or we can create custom deplink also like myApplication://…. Android Deep Linking Example First of all create a new android project to understand deeplink in android app. Now make intent filter in t...

Exploring nopCommerce - open source e-commerce shopping cart platform in .NET Core

I've been exploring nopCommerce. It's an open source e-commerce shopping cart. I spoke at their conference in New York a few years ago and they were considering moving to open source and cross-platform .NET Core from the Windows-only .NET Framework, so I figured it was time for me to check in on their progress. I headed over to https://github.com/nopSolutions/nopCommerce and cloned the repo. I have .NET Core 2.2 installed that I grabbed here . You can check out their official site and their live demo store . It was a simple git clone and a "dotnet build" and it build and ran quite immediately. It's always nice to have a site "just work" after a clone (it's kind of a low bar, but no matter what the language it's always a joy when it works.) I have SQL Express installed but I could just as easily use SQL Server for Linux running under Docker . I used the standard SQL Server Express connection string: "Server=localhost\SQLEXPRESS;Database...

Django – Getting Data from PostgreSQL and Showing it to Template

In this Django tutorial, we’ll see how we can get the data stored in the database and display it to the template. Prerequisites Have a look on the previous article, in which we’ve seen how to create an app, model and create a super user to work with admin interface. https://www.thecrazyprogrammer.com/2019/01/django-models.html So let’s start. Getting Data from PostgreSQL and Showing it to Template 1. Upload Data First We’ve already created a model Job inside jobs app , which is having two fields  ImageField  and CharField, ImageField for storing a picture for a particular job and TextField to store the summary about that job. Screenshot of Model Job: Screenshot of Admin Panel: Currently we have no data inside our database. So let’s upload some data using the admin panel. (we’ll also see how to upload data using templates in later articles). So click on ADD JOB button and upload some pics and text. So I’ve added two Job objects. Now let’s see how to get them a...

How to convert an IMG file to an standard ISO easily with Linux on Windows 10

The optical disc drive is giving out on my GoldStar 3DO machine . It's nearly 30 years old. I want to make sure that the kids and I can still play our 3DO discs. I ordered this fantastic USB mod for the 3DO from a fellow out of Belarus . It came and it's great. It includes a game/file selector app that you boot off of if you put it in the root of a FAT32 formatted USB drive. However, when I cloned my collection of CD-ROMS I ended up with a bunch of IMG files, and this mod wants ISO files. I thought my cloner was going to give me ISOs. I did the obvious thing and googled for "how to convert an img file to an iso." This plunged me into the hellscape that is CNET and Major Geeks download wrappers . Every useful application or utility out there is hidden on a page filled with Download Now buttons that aren't the button you want OR if you get the app you want, it's actually a Chrome Search hijacker. I just want to convert a damn IMG to an ISO. If you want to do...

Lighting up my DasKeyboard with Blood Sugar changes using my body's REST API

I've long blogged about the intersection of diabetes and technology. From the sad state of diabetes tech in 2012 to its recent promising resurgence , it's clear that we are not waiting . If you're a Type 1 Diabetic using a CGM - a continuous glucose meter - you'll want to set up Nightscout so you can have a REST API for your sugar. The CGM checks my blood sugar every 5 minutes, it hops via BLE over to my phone and then to the cloud. You'll want your sugars stored in cloud storage that YOU control. CGM vendors have their own cloud , but we can easily bridge over to a MongoDB database. I run Nightscout in Azure and my body has a REST API. I can do an HTTP GET like this: /api/v1/entries.json?count=3 and get this [ { _id: "5c6066d477b2a69a0a7810e5", sgv: 143, date: 1549821626000, dateString: "2019-02-10T18:00:26.000Z", trend: 4, direction: "Flat", device: "share2", type: "sgv" }, { _id: "5c6065a877b2a69a0a...