Posts tagged "rss"

Found 230 posts tagged rss

Discontinuing comments

Published on
#comments #general #site 

A few months ago I announced that I am bringing back comments to this blog.

I got a few comments, but I came to the conclusion that it's not worth it.


Read more

Useful homebrew formulas for Mac

Published on
#brew #homebrew #mac #cli 

Below you'll find a list of homebrew formulas I personally use.

I have also attached some more sources for further inspiration.


Read more

How to execute a remote script with Ansible

Published on
#programming #ansible #docker 

The issue is simple: I want to run a script, that is located on the server.

The solution is also simple: use the builtin command Ansible module.


Read more

Spotlight not working on Big Sur: how to fix Spotlight index on MacOS Big Sur

Published on
#mac #spotlight #bigsur 

After installing Big Sur, I was having issues with Spotlight.

Applications were not listed and generally it didn't seem to work properly.

These are the steps that helped me to fix Spotlight indexing on Big Sur.


Read more

7 Visual Studio Code extensions I regularly use

Published on
#visualstudio #programming 

VSCode is my favourite code editor, and here are some extensions I use daily and worked very well for my needs.

Focus is on Web Development with JavaScript, TailwindCSS, node.js + npm, some personal templating choices and Material skin.


Read more

Experiment: Navigating the web with JavaScript disabled

Published on
#javascript #web 

Yes, you read that right.

I'm a JavaScript Developer, and I'm currently navigating the web with JavaScript disabled.

WTF? Why? How? But seriously, WHY?


Read more

manjaro connect bluetooth keyboard at login screen

Published on
#linux #manjaro #bluetooth 

Finally found the correct bluetooth configuration to let my bluetooth keyboard connect at login.

This allows me to use it on the login screen to enter my password in Manjaro Linux.


Read more

How many visitors block ads and web analytics?

Published on
#analytics #site 

In the past month I tried to understand how many visitors on this very site are blocking the Plausible Analytics tracker script.

Here are my findings.


Read more

How to solve manjaro different login, missing plasma desktop package

Published on
#manjaro #linux 

If you're suddenly presented with a different login screen, and can't login to your manjaro installation, here is how you can solve the issue.


Read more

Self-hosting with nginx + docker-compose

Published on
#selfhosting #nginx #programming #docker 

Self-hosting applications and services has never been easier.

Here I want to outline how I deploy and manage my self-hosted services on Linode with nginx, docker-compose and CloudFlare


Read more

Simple Server-sent events example in Node.js/JavaScript

Published on
#nodejs #javascript #programming #sse 

With Server-sent events you are able to send one-directional events to a web page.

Here is an example of how I used this functionality in Minimal Analytics


Read more

Lazy loading images in 11ty/eleventy

Published on
#javascript #eleventy #seo #blogging #programming 

Here I want to show how you can create your own 11ty plugin.

Below I'm going to illustrate how to lazy load images using Eleventy plugins.


Read more

How to test a function that works with time

Published on
#javascript #nodejs #testing #programming 

While building Minimal Analytics I had the need to test a function that was dependent on time.

In my case, the function returned the milliseconds until midnight.

Here is a simple way to test the function msUntilMidnight.


Read more

Making Minimal Analytics

Published on
#fullstack #nodejs #javascript #preact #programming 

Web Analytics & dashboards always fascinated me.

This is my approach to a self-hosted, simple web analytics solution.

It also helped me to get back to Full stack web development, using a clean and testable approach.


Read more

Beware of Monero mining attack through GitHub Actions and malicious Pull requests

Published on
#general #monero #cryptocurrency #github #pullrequest 

While scrolling through my GitHub feed I noticed a recent fork (5 hours ago) of a repo of mine.

Nothing so weird so far.

Out of curiosity I checked if the user wanted to make a decent PR and improve something in the code.

The user in fact made a new commit on their fork and added a new file. A new GitHub action.

Let me explain what happened.


Read more

Switching to CloudFlare Pages, from AWS S3 + CloudFlare DNS

Published on
#blogging #programming #cloudflare #aws #dns #site 

Read more about my experience switching the static hosting for this very site.

Namely from a combination of AWS S3 + CloudFlare, to only CloudFlare Pages.

Will get into hiccups, overall experience and ease of use.


Read more

Cos’è e com’è stato sviluppato il Lean Validation Playbook

Published on
#project #general 

Insieme a Fightbean e Matteo Cavucci abbiamo costruito il Lean Validation Playbook.

Che cos'è?

The Lean Validation Playbook è una raccolta di metodi per testare idee e soluzioni legate alla creazione di prodotti digitali e affronta il lato operativo che manca a molte strategie di business.

In questo post descrivo come abbiamo messo online un sito statico con 11ty e altri strumenti utilizzati per organizzare il lavoro.


Read more

Simple Static site/blog search in 14 Lines of JavaScript

Published on
#javascript #blogging #programming #search #static 

This is my approach to a purely client side search feature for static blogs and sites.

I am currently using this under /posts to let readers search through my blog posts.

Read more below about how to integrate it in your site.


Read more

What apps I'm currently self-hosting

Published on
#self-hosting #docker #programming 

Wanted to share what apps & services I'm currently self-hosting on my small Linode VPS

TLDR;

Using docker-compose, nginx and CloudFlare

Everything runs smoothly on a "Nanode" (Linode's version of a 5$/month VPS with 1GB RAM, 25GB SSD, 1 CPU)


Read more

Manage multiple network connections in Manjaro (Wireguard VPN + Pi-hole)

Published on
#vpn #privacy #linux #manjaro #vpn #pihole #network 

Found a way to easily connect and disconnect from a network in Manjaro.

The solution is having separate connections for your Wireguard VPN or Pi-hole instance, alongside your usual network you connect to.


Read more

Self-hosted Miniflux + Wallabag

Published on
#rss #self-hosting #miniflux 

Found the perfect combination for self-hosting my reading stack: Miniflux and Wallabag, you may now kiss!


Read more

Tracking RSS subscriptions with UTM parameters

Published on
#rss #analytics #programming #utm 

UTM parameters are used since the dawn of time to track marketing campaigns.

Can you use them to reduce dark/direct traffic and label RSS subscriptions?


Read more

Learn Elixir - A study path

Published on
#elixir #programming #study 

Below you can find resources for getting started with Elixir.


Read more

Bitcoin is trademarked. Is it really?

Published on
#bitcoin 

Bitcoin, the cryptocurrency invented in 2008 by an unknown person or group of people using the name Satoshi Nakamoto, is trademarked? Is it really?


Read more

Read mbox file with mutt or Thunderbird

Published on
#linux #mail #mbox #thunderbird 

A few months ago I requested a data export from my former google account.

Especially containing emails and contacts saved in my account.

Received a 3GB zip file containing a 10GB mbox file.

This is how I managed to read it, either in the terminal (mutt) or with Thunderbird.


Read more

My notes while learning Elixir

Published on
#elixir #programming #study 

These are my notes for learning Elixir.


Read more

My reading stack with Miniflux/RSS & Pocket

Published on
#rss #open-source #self-hosting 

I want to outline the tools I use to consume textual content, and why it perfectly fits my needs.

Who knows, maybe this can be helpful for you too.


Read more

Let's learn some Elixir, again

Published on
#elixir #programming #study 

Setting myself the challenge to learn Elixir, again.


Read more

5$/month Self Hosted VPN with WireGuard

Published on
#vpn #privacy #wireguard #self-hosting 

This will take you less than 5 minutes to get a private VPN on your own Ubuntu server.


Read more

Comments on cri.dev are BACK

Published on
#blogging #comments #site 

YES!

Comments are back, and I'm curious to see if this can spark some interesting discussions and be worth the hassle of self-hosting the comments.


Read more

Put that in the URL, please

Published on
#ux #general #url #web 

Be it a filter for your dashboard, the date of an article, or a simple pagination number.

Please, put that in the URL, ok?


Read more

A retrospective of 100k yearly pageviews

Published on
#analytics #seo #retrospective #general #site 

Incredible!

70k visitors / 100k pageviews (excluding those with analytics blockers installed) reached this very website in the last year.


Read more

Getting started with Mastodon

Published on
#fediverse #social 

First of all, what is Mastodon?

From joinmastodon.org

it's a network of thousands of communities operated by different organizations and individuals that provide a seamless social media experience


Read more

From Mac to Linux

Published on
#linux #mac 

Experimenting with Webmention

Published on
#webmention #fediverse 

Webmention is a simple way to notify any URL when you mention it on your site. From the receiver's perspective, it's a way to request notifications when other sites mention it.

From https://www.w3.org/TR/webmention/


Read more

Notes on 'Blogging for Business'

Published on
#blogging #marketing #business #general 

Here you can find my notes about the course "Blogging for business" by ahrefs.com

I highly recommend following the step by step course to convert your blogging from a waste of time to a source of potential customers and sales.


Read more

Node.js 15 is here

Published on
#nodejs #javascript #programming 

Node.js 15 has been released, with exciting changes and improvements!


Read more

What is technical debt?

Published on
#software #cleancode #technicaldebt #programming 

In a sentence:

Anything about your code and development environment that slows you down.


Read more

Indie makers and the Sunk Cost Fallacy

Published on
#indie #economics #programming 

The Sunk Cost Fallacy is a real pain.

It's a cost that you sustained in the past (be it time, money, energy, whatever) and cannot be reversed, cancelled or undone.

The fallacy is that yet knowing about the sunk cost of a project, you are often tempted to justify your future investments because of your past (most likely lost) investments.

The sunk cost should not influence your future decisions, yet it does. And the outcomes are often delusion, sadness and stress.


Read more

Tracking HackerNews history in git

Published on
#hackernews #scraping #automation #programming 

First of all: this is based on the idea of https://simonwillison.net/2020/Oct/9/git-scraping/ and https://github.com/simonw/ca-fires-history

The gist:

  • every 20min
    • scrape hackernews frontpage items
    • save them in hn.json
    • commit and push

Find the git repository here at christian-fei/hn-history


Read more

Test driving a HackerNews scraper with Node.js

This is a short summary of my experience while writing a simple HackerNews scraper.

As a pure exercise or kata if you want, I tried to apply Clean code, Refactoring and Testing priciples for this small npm module.

The task is simple:

Get the posts on the front page of https://news.ycombinator.com and parse them.


Read more

How to make Polls with Plausible Analytics

Published on
#plausible #analytics #privacy #programming 

Plausible Analytics recently introduced Custom props for events (here the docs).

This was the perfect opportunity for me to implement an idea I had long time ago: (Privacy-friendly) Polls with Plausible Analytics!

The idea is to use Plausible's Custom props and hook them up to a simple poll component in JavaScript!

Let's get started 🚀


Read more

Fix npm process killed during npm install

Published on
#npm #nodejs #outofmemory #programming 

This happened to me recently, and I couldn't understand the cause.

"Suddenly", after updating some npm packages, my npm install was "not working".

It exited abrubtly with status code 137, with the error message "Killed".


Read more

Communicating with Bangle.js Watch over BLE with Node.js

Published on
#bangle #nodejs #iot #programming 

This is a short summary of what I learned while playing around with my Bangle.js Watch.

I managed to

  • add an application to the Bangle.js (with create-bangle-app)
  • send accelerometer data over Bluetoot Low Energy
  • discover & connect to BLE devices with Node.js
  • read accelerometer data with Node.js (coming from the watch)

Read more

Bangle watch as an accelerometer mouse

Published on
#bangle #iot #nodejs #programming 

Recently I got myself a treat: a Bangle.js Watch! ⌚️

It's a pretty awesome, open-source watch based on Espruino and Node.js, and much more! 🤓

Read about my experiments here especially for creating a mouse-watch app with Node.js and Bluetooth Low Energy!


Read more

How to fix xcode-select no developer tools found

Published on
#xcode #mac 

Saw the following error when I was trying to install an npm dependency, that had native C bindings:


Read more

Why privacy matters - Glenn Greenwald

Published on
#privacy 

My notes about the Ted X talk by Gleen Greenwald at Ted X Global 2014.

The recording of the talk can be found here on yewtu.be


Read more

Notes "Edward Snowden interviewed by Ron Paul"

Published on
#privacy 

These are my notes about the Interview of Edward Snowden by Ron Paul at the Liberty Report.

Video can be found here on yewtu.be


Read more

Fast virtual scrolling with preact

Published on
#preact #react #javascript #programming 

If you need to show many list items, one common technique to overcome this issue, is to apply the concept of "virtual scrolling".


Read more

Get things done for real

Published on
#gtd #getthingsdone #lean 

Read about how I personally get things done.


Read more

Notes on “I've got nothing to hide”

Published on
#privacy 

Recently I stumbled upon this paper about “I've Got Nothing to Hide” and Other Misunderstandings of Privacy by Daniel J. Solove

Do yourself a favor and read it here


Read more

Raspberry Pi as a local server for self hosting applications

Published on
#raspberrypi #opensource #self-hosting 

Doing an experiment with my RPi 4, using it as a small but powerful local server.

My current PC is a 10 year old Macbook Pro 13" 2010, which is sluggish sometimes.

So I want to offload some heavy tasks (ffmpeg time-lapse creation, long-running tasks and services) to the Raspberry Pi and connect to it either via LAN or Wi-Fi.

Below you can read my findings about performance, applications and general issues I encountered and tried to solve.


Read more

'But I have nothing to hide.'

Published on
#privacy 

Some resources I found while researching the argument of "I have nothing to hide":


Read more

DIY IoT door monitor with ESP8266

Published on
#iot #electronics #diy #programming 

Using an ESP8266 for IoT projects makes me go fast while prototyping.

The compact format is perfect for small DIY devices.

Wi-Fi connectivity is built-in, and it's super affordable.

The ESP8266 is a low-cost Wi-Fi microchip, with a full TCP/IP stack and microcontroller capability (wikipedia)


Read more

Simple Time-lapse with a Raspberry Pi

Published on
#raspberry #iot #hardware 

Time-lapses always fascinated me. So I wanted to create one on my own.

Had a spare Raspberry Pi Zero W catching dust, you can purchase one for ~ 25$ and the related Raspberry Pi Camera module for < 20$.


Read more

4 Most powerful Mini-PCs in 2020

Published on
#minipc 

Rough overview

NameCPURAM
Chuwi HeroboxIntel Gemini-Lake N41008GB LPDDR4
Intel NUCIntel Core i3 8109UMax 32GB DDR4 2400 MHz
AcePC AK1Intel Celeron Apollo Lake J34558GB DDR3 SDRAM
Coofun CJ34Intel Apollo Lake Celeron J34558GB LPDDR4

Read more

Simple email trick to manage your newsletters

Published on
#email #trick 

Struggling with dozens of newsletters in your inbox? (or should I say "Imbox"? </troll>)

I use this super simple organizational trick / habit when signing up for newsletters.


Read more

Techniques to improve SEO for a static website or blog

Published on
#blog #seo 

To be found, you need to describe yourself well to computers

SEO is as important as a good mailing-list to reach your (potential) audience.

Over the past 10 years, I've made some mistakes and also took home some knowledge about SEO for blogs and websites.

Below I've compiled a list of techniques and code-snippets that I personally use (hint: view-source) to improve for organic website traffic and SEO.

To make your content more enjoyable by users (social media sharing, RSS, search results) and descriptive to machines (SEO).


Read more

Made 13 Dollars with Brave and Basic Attention token

Published on
#crypto 

After using Brave for almost a year, I can extract some stats from its usage over time:

  • 152,906 trackers blocked
  • 2,26GB of bandwidth saved
  • "2,1 hours saved" (no clue how this is calculated)

But more importantly, I made some bucks!


Read more

Simple event tracking with Plausible Analytics

Published on
#javascript #analytics #programming 

Do you want to know how users make use of your site? Which links they click most and what converts most?

From the official documentation you can trigger custom events via JS, by including a small utility function plausible:

<script>
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }
</script>

Whenever you call plausible('...event...') you put a tracking event in a queue (window.plausible.q) and will be tracked.


Read more

Notes on 'Marketing for Developers' - devmarketing.xyz

Published on
#marketing #landing 

Purchased a convenient bundle of "Marketing for Developers" a few years ago. Time passes, and nearly forgot about the book and course. Priorities. Life. You know, first world problems.

Resumed the course, this time for real, and I’m trying to motivate myself by taking notes about my learnings.

Buy it here Marketing for Developers – advice for programmers, software, and SaaS


Read more

Get distinct field names of sub documents in MongoDB

Published on
#mongodb #programming 

Let's say you have these documents in your collection items:


Read more

Aggregations with sub-documents in MongoDB

Published on
#mongodb #programming 

I would like to extract statistics about sub-documents in a collection.

E.g. in the form of count, sum and average for each field

Let's say you have the following documents in the items collection:

db.items.find()
{ "_id" : ObjectId("5f034ce90b15686f5d78baed"), "subDocument" : { "field1" : 42, "field3" : 10 } }
{ "_id" : ObjectId("5f034ce90b15686f5d78baee"), "subDocument" : { "field2" : 14, "field3" : 6 } }
{ "_id" : ObjectId("5f034ce90b15686f5d78baef"), "subDocument" : { "field1" : 6, "field4" : 11 } }
{ "_id" : ObjectId("5f034cea0b15686f5d78baf0"), "subDocument" : { "field3" : 3, "field4" : 26 } }

How would you solve the use-case of aggregating each field of the subDocument's dynamically?

Event without actually "knowing" which fields are contained in subDocument?


Read more

Most valuable developer linux notebooks in 2020

Published on
#linux #notebook #developer 

Recently I got into Linux again after a long hiatus.

I fell in love with Pop!_OS by System76.

Ubuntu 20.04 also looks gorgeous and made me want to go back to the Linux side.

So I started looking for a worthy laptop for the job, with excellent support for Linux, and these are my findings.


Read more

Install Homeassistant on Raspberry Pi

Published on
#raspberry #iot #homeassistant #automation 

home-assistant.io is the latest great tool I discovered, it's simply a beautiful piece of technology.

Open source home automation that puts local control and privacy first

I recommend installing the Hass OS on a Raspberry Pi 4 with an SD Card of at least 32GB.


Read more

Notes on "Code BEAM V 2020"

Published on
#elixir #programming 

What: Code BEAM V official website

When: 2020/05/28 - 2020/05/29

Where: On the interwebz

Schedule: code-beam-v#schedule


Read more

Upgrade HTTP requests with X-Forwarded-Proto Header in HAProxy

Published on
#haproxy #programming 

Recently I stumbled upon an issue with a web application that was proxied by HAProxy.

The issue was that the requests that started from the HTML document were served and requested over HTTPS, but "inner" resources (AJAX calls, images, etc.) were configured as HTTP.


Read more

Authenticated uplinks with verdaccio

How to configure authenticated uplinks with Verdaccio.


Read more

Clean up Mac OS: How I freed 35GB of space

Published on
#mac 

My disk space was running low. I had less than 100MB of free space. I was sick of running low on disk space.

Clean My Mac wasn't an option. I don't want to spend 40$ for a cleaning tool, if you're so inclined feel free to do it.


Read more

Fixing 431 Request Header Fields Too Large in Node.js

Published on
#nodejs #javascript #programming 

You're seeing a blank page saying "HTTP_ERROR 431"?

And you're running a Node.js HTTP server, like express or fastify?


Read more

Setting up a Verdaccio npm registry

In case the npm registry goes down, it's wise to have a backup registry.


Read more

Privacy-friendly alternatives to popular services and tools

Published on
#privacy #foss 

privacy matters, and coherence costs

Motivation

I tried to do a self-examination, reflecting on what matters to me about Privacy.

Being more aware of what you share while browsing the web comes with experience and can be seen as a journey.


Read more

Elixir trick: start an Observer window with mix

Published on
#programming #elixir 

Yesterday I wanted to monitor the processes that my Elixir application was spawning.

I knew there was something called Observer, but couldn't remember exactly how to do it.

Taking a look at the doc, I found this debugging page that mentioned :observer.start().

The suggested usage was with iex -S mix and then running :observer.start() in the mix shell manually.

I don't like manual things that much.


Read more

Validate your RSS feed

Published on
#rss #testing #CI #blogging 

Today a dear user made me aware that my RSS feed broke. There was a XML Parsing Error for cri.dev/rss.xml.

ASAP after work I checked the validity through validator.w3.org/feed/ and in fact there were some issues with it.


Read more

Minimal dark mode with CSS and JavaScript

Published on
#javascript #css #darkmode #programming 

Dark mode is everywhere nowadays. Personally using darkreader as an extension of Brave browser, and I'm loving it.

But if you want to roll your own, for fun or for whatever reason, continue reading to understand how I did it.


Read more

Using µcompress to dramatically optimize static assets

Published on
#javascript #blogging 

µcompress is a lovely utility by WebReflection that compresses common static files.

A micro, all-in-one, compressor for common Web files

Using it since commit ce0a9e on this very website, in my GitHub Actions workflow.


Read more

Ad blocking with Raspberry Pi and Pi-hole

Published on
#raspberry #adblocking 

Sick of ads on the Web, YouTube and other services?

Do you have a Raspberry Pi (4, 3, or even a Zero like me) laying around collecting dust and you want to make use of it?

Use it for ad-blocking in your home network and to finally browse the web, watch videos etc. without annoying ads.


Read more

Nullish coalescing in Node.js 14 and JavaScript

Published on
#javascript #nodejs #programming 

The Nullish coalescing operator in useful to handle default values, without short-circuiting on values that result as falsy.

Falsy values are undefined, null, false, 0, NaN, and '' in JavaScript, and sometimes you want to retain those values, explicitly excluding null and undefined.


Read more

Optional chaining in Node.js 14 and JavaScript

Published on
#javascript #nodejs #programming 

A long awaited feature of the language and runtime has been released and is available in Node.js 14 (and modern browsers): Optional chaining!


Read more

Road to Elixir: Monitor Crypto assets

Published on
#elixir #programming 

Let's try to monitor crypto assets through the Coinmarketcap API, with Elixir!

Topics I want to explore in this exercise are:

  • Elixir Supervision trees
  • HTTP calls with Elixir (with HTTPoison)
  • TDD and Refactoring

Read more

Resuming Elixir by self-hosting plausible analytics

Published on
#elixir #analytics #programming 

As soon as Elixir was released a few years ago, I got into it and started learning and building things with it.

Thanks to the help of some dear colleagues I had the opportunity to get valuable feedback and learn even more concepts about GenServers, the BEAM virtual machine, ETS and Erlang+Elixir in general.

I also went to my first Erlang+Elixir conf, and had the chance & honour to meet Joe Armstrong, #rememberingjoe.

On 2020/04/22, during quarantine, I decided to get back to Elixir (who knows: maybe even dabble with Erlang directly).

I post-poned this too much now, it's time to get back to the distributed programming world.

Without further ado, below my journey (in form of a daily journal) about learning more about Elixir (again), the BEAM, plausible analytics and things discovered along the way!


Read more

devblog: yet another static site generator, seriously

devblog is yet another lightweight static site generator.

Although there are widely used SSG like 11ty (which this blog was previously based on), Jekyll (also previously used), GatsbyJS and many others, I wanted to get my hands dirty and understand how to make the process of building a static blog even simpler, if possible.

Even simpler in the sense of "it does just what I need and nothing more".

Install via npm i -g devblog or create a blog with a one-liner npx devblog init my-new-blog, cd my-new-blog and serve with npx http-server _site 8080. It's that easy.

Rebuild the blog by running npx devblog (or npm i -g devblog and then just run devblog in the main directory)

Continue reading my story of building devblog.


Read more

How to solve Puppeteer Chrome Error ERR_INVALID_ARGUMENT

Published on
#puppeteer #javascript #scraping #programming 

I was encountering this error when trying to set up a puppeteer instance with a proxy.


Read more

How to connect puppeteer to a Proxy

Published on
#puppeteer #javascript #scraping #programming 

In a previous post I tried to explain how to troubleshoot an issue when connecting to a Proxy with Puppeteer investigating API documentations , Chromium flags and all that funny jazz..


Read more

Crawling a web site with browserless, puppeteer and Node.js

Example repository and explanation to a practical crawling with browserless and puppeteer.


Read more

Ultimate web scraping with browserless, puppeteer and Node.js

Browser automation built for enterprises, loved by developers.

browserless.io is a neat service for hosted puppeteer scraping, but there is also the official Docker image for running it locally.

I was amazed when I found out about it 🤯!

Find the whole source code on Github christian-fei/browserless-example!


Read more

Twitter OAuth Login with fastify and Node.js

Published on
#nodejs #javascript #twitter #oauth #fastify #programming 

GitHub example repo

At christian-fei/twitter-oauth-login-in-nodejs on GitHub you can find the whole source code.

Learn how to create a Twitter OAuth Application


Read more

Twitter OAuth Login by example with Node.js

Published on
#nodejs #javascript #twitter #oauth #programming 

Lately I found myself dealing with Twitter and Google OAuth (1.0a and 2.0) to authorize a user to act on their behalf, namely reading profile information, reading and posting content on their behalf or other common permissions.

Since my process of trying to understand and make sense of OAuth has been both fun and rough, I wanted to summarize a full example in a single JavaScript file and document other findings along the way.


Read more

First steps with Darklang

Published on
#darklang #programming 

What is it?

Programming language, editor, and infrastructure for building backends

Functional / imperative hybrid language is influenced by Elm, Rust, OCaml, Swift, Ruby on Rails, Clojure, TypeScript.


Read more

About Cloudflare's support for ccTLDs and gTLDs

Published on
#programming #dns #cloudflare 

Today I stumbled upon this official doc by cloudflare stating the current TLD - Policies.

It is like finding a treasure for me because I was looking for an official list of supported domains on Cloudflare, since I own a few .cc, .ninja, .xyz domains.


Read more

Take a photo with raspistill on a Raspberry Pi

Published on
#raspberry #programming 

raspistill is the command line tool for capturing still photographs with the camera module.

Here you can find the official docs.


Read more

Twitter OAuth by example in Node.js

Published on
#javascript #nodejs #programming 

Curious about how to call an HTTP API like Twitter or GitHub by authenticating through OAuth (1.0a and 2.0)?

Read more about how to do it with Node.js

Learn how to create Twitter login with OAuth 1.0a.


Read more

So Long, and Thanks for All the Veggies

Published on

🍅

As much as it hurts, this action had to be taken due to apparent trademark issues with the word pomodoro.

pomodoro.cc has to close.


Read more

Minimal environments with dotenv and Node.js

Published on
#javascript #nodejs #programming 

Personally I use dotenv to handle different environments in my Node.js applications.

It gives you the ability to specify a .env file (generally provisioned on each environment with the corresponding environment variables), along these lines:


Read more

Connect to MongoDB with monk in Node.js

Published on
#javascript #nodejs #programming 

An example of connecting to mongodb with the Monk NPM module.


Read more

Recover from failed lerna publish

Published on
#javascript #nodejs #programming 

Lately, I was having issues with lerna while trying to publish packages from a mono-repo.

The problem was that lerna, sometimes, failed while publishing the changed packages (with the command lerna publish --conventional-commits)!


Read more

The cleanest way to maintain connect / express middlewares in Node.js

Published on
#javascript #nodejs #programming 

I want to share how I maintain my connect / express middlewares for simple HTTP APIs in Node.js

The code snippets below are taken from pomodoro.cc api source code.


Read more

the color fe1

Published on

Angular: Filter already selected items from ng-options

Published on
#angularjs #javascript #programming 

Let's say you have an array of things.

You want to provide to your user the ability to select two things from this array.

If you use the <select> tag you won't be able to select multiple options from this list unfortunately. You can either come up with a new directive that handles this, use somebody else's plugin, or roll your own Angular filter (probably for learning purposes).


Read more

Deploy Eleventy site with Github Actions on AWS S3

Published on
#javascript #nodejs #programming 

gh-actions-working.png

I finally managed to get the deployment of an eleventy - 11ty site (namely this one) and sync with AWS S3, where this blog is hosted.


Read more

Build for a slow connection

Published on

speed matters

trying to work on your pc in 2019 is the worst if you are experiencing a slow internet connection.


Read more

How to fix Ansible error about "undefined variable"

Published on

Got the following error when running my playbook, with a newly installed external role:

fatal: [52.28.21.116]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible_distribution' is undefined\n\nThe error appears to have been in '.../tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- debug:\n  ^ here\n"}

Read more

Publishing org scoped npm packages with travis

Published on
#javascript #nodejs 

If you stumbled upon this article, you are probably seeing the following error message on travis in the deployment stage:


Read more

my current blogging stack

Published on

Make Anaconda executables available in your PATH (fish shell)

Published on
#programming #pythong #fish 

To make Anaconda executables like conda or anaconda-navigator available in your shell, you'll need to edit your ~/.config/fish/fish.config and add the directory where the commands are located.

If you're using Anaconda with Python 2.x, the path will be /anaconda2/bin/.

For Python 3.x and up: /anaconda3/bin/


Read more

pm2 deploy fast

Published on
#javascript #nodejs #programming 

I found it. It found me...

Whatever!

I came across the only documentation about cloning a git repo with the [--depth option](https://git-scm.com/docs/git-clone#git-clone


Read more

Using Cryptosheet.cc, aggregations

Published on

I don't know about you, but I always struggled with keeping track of my cryptocurrency assets that I have on different exchanges.

With the help of cryptosheet.cc I am now able to get a realtime view of my account balances on different exchanges like GDAX, Coinbase, Binance, Kraken, Gatehub, Block.io.


Read more

Easy rate limit with Promise.all and p-limit

Published on
#javascript #nodejs #programming 

Rate limiting API calls to an HTTP service doesn't have to cumbersome and too complicated.

A simple way to achieve this (and that I use all the time) is to combine Promise.all with an npm package called p-limit.

p-limit is used to run multiple promise-returning & async functions with limited concurrency.


Read more

Offloading my Inbox items to /discover

Published on

Lately I felt overwhelmed by my Obsessive Compulsive Reminder Disorder ™. In other words, my Inbox was full of interesting links that I saved as a reminder, but easily got out of hand:


Read more

A story about npm publish / unpublish

Published on
#javascript #nodejs #programming 

Today I sat down and wrote a tiny package called wait-for-user-input. it can be used to wait for stdin input in a command line script.


Read more

Mapping historic market data

Published on
#crypto #blockchain #javascript #programming 

Market data is generally represented as an array of arrays, and each entry is a data point that represents a "snapshot" of the market in a given period of time.


Read more

My dotfiles

Published on

how i deploy my site

Published on
#programming 

how i build my site

Published on
#programming 

Chaining and indenting after the return statement

Published on
#javascript #programming 

Lately I have been following the Standard.JS style guide (after disliking ava & xo) and took style-guides in general more seriously.


Read more

Trying out Redash

Published on

Today I installed redash with AWS EC2 and AWS SES, with the help of the official guide.


Read more

How to read Hacker Newsletter

Published on

Today, at the issue date of #338 of Hacker Newsletter, I tried:

  • not to read ahead
  • not to "spoil" me any links (maybe it's just me)
  • to reflect on how to learn the most out of each issue of Hacker Newsletter

Read more

Use Simple-Jekyll-Search on your blog in these easy steps

Published on
#javascript #programming 

Requirements

  • a Jekyll blog (of course)

Create search.json

Create a file search.json with this content https://github.com/christian-fei/Simple-Jekyll-Search/blob/master/example/search.json


Read more

I was at fosdem 2016 and it was awesome!

Published on
#programming #fosdem 

I had a blast at this year's FOSDEM.


Read more

Using a daily activity log

Published on
#practices 

Today I started using joebew42`s daily activity log concept.

It was very interesting to see his progress and keeping track of his studies and interesting reads over the course of over 4 months!

Here`s my take.

Now I want to try it and to see it as a log and motivation/reminder to study regularly. I will also use it probably as a aid to review the studies and to visualize the progress.

Finally I will also find a way to integrate it with pomodoro.cc, I`m sure about that..


Read more

Forking is a commitment

Published on
#git 

Elixir Plug order matters!

Published on
#elixir 

I ran into this gotcha today as I was playing with Plug of Elixir.


Read more

Introduction to AngularJS

Published on
#angularjs #javascript #programming 

Angular is a JavaScript framework for creating modern web applications, which are inherently declarative, modular, with testability in mind.


Read more

Jekyll new post script

Published on

Always $digest after you expect

Published on
#angularjs #javascript #testing #programming 

Angular`s digest loop is like a baby: you need to take care of it and feed it well, or it will puke all over your nice shirt. Actually, it will probably, eventually do it anyway.


Read more

How to invalidate AppCache

Published on
#javascript #programming 

AppCache is a nice guy when it comes to caching stuff, but at the end of the day it is just a fucking douchebag.

For me AppCache is a smelly, almost invisible, annoying little parasite.

If you're having trouble cleaning up the mess this guy did (aka invalidate the cache), these simple steps will lessen your burden and throw this douchebag out of the parents' house.


Read more

Write a damn README

Published on

Functional JavaScript: Write your own negate/not function

Published on
#javascript #nodejs #javascript #programming #fp 

Let's say you want to filter odd numbers from a list of numbers, like [1,2,3,4,5,6] should become [1,3,5].

One way to solve this problem in a functional fashion is to provide an odd filter function, that is internally composed by a negation of an even filter on those numbers.


Read more

About business value and confidence in legacy projects

Published on
#programming 

Recently I got the opportunity to work in a legacy, and wanted to share what I learned about gaining confidence and still deliver business value.


Read more

How to make a pull request on GitHub from the command line

Published on
#git 

I hope this will help you to push your productivity level to the edge and to find the ultimate flow to contribute to open source projects with ease :)

You need to install hub, which is a tool that will wrap your git cli tool with some useful utility functions to interact with GitHub.


Read more

How to configure Drone behind an nginx proxy on a subdomain

Published on
#programming #drone #ci 

Drone listens on port 80 by default. If you want to host your application on the same server, then that's an issue.


Read more

How to setup Drone CI on a DigitalOcean droplet

Published on

There are countless continous integration continuous integration tools: Travis, Jenkins, Shippable, Circle, CodeShip, Wercker, etc.


Read more

A practical workflow for resizing images with ImageMagick

Published on
#programming #imagemagick 

Resizing an image to the desired size and proportion sounds like a simple process, but I found it quite challenging using Preview since I don't own a legitimate copy of Photoshop.

Fortunately I came across a nice tool that exists since the archaic times of computers (for me at least), since 1999, that gives me very handy commands to solve this workflow. It's called ImageMagick.


Read more

A closer look at Angular's dependency injection

Published on
#angularjs #javascript #programming 

Angular's DI in combination with lazy loading of dependencies is one of my favourite features of Angular.

I was fascinated about the simplified API that Angular provides to make DI happen and the ability to create testable, modular code out of the box.

Anyways we are here to look what's behind Angular's DI, so here we go.


Read more

Updating dynamic fields and nested arrays in MongoDB

Published on
#programming 

Let's take a simple example: a TicTacToe gamefield saved as a nested array in MongoDB.

In the Collection a gamefield document has the following structure:


Read more

Simple templating with regular expressions

Published on
#programming #javascript #nodejs 

Let's say you made a jQuery plugin and want to have an output (like a list of search results), whose aspect and format can be defined by the user.

Theory

The theory is very simple:

With a JSON file/object and the template the user provided you can create a basic templating system.


Read more

How to lazy load Disqus comments

Published on
#javascript #disqus 

Disqus is definitely one of the best commenting systems out there (not to mention that it is responsive). As a speed freak I'm always concerned how much assets a website needs to load, affecting the overall load time of it.


Read more

Berlin - April 2013

Published on

QR code

Published on
#til #qr 

duckduckgo short url

Published on
#til #web 

scroll-behaviour

Published on
#til #javascript #programming 

Scrolling/Jumping to a specific part of a webpage can be achieved in various ways, and with different bevaviours.

E.g.

  • JavaScript
  • CSS
  • HTML

Read more

nmtui

Published on
#til #programming 

Today I had an issue with my Manjaro installation, namely I wasn't able to login to my usual desktop environment.

This because plasma packages were removed accidentally..

I needed to connect to the internet to update some packages.

To do this, I found the tool nmtui very useful.


Read more

CAPTCHA

Published on
#til #programming 

Video: Why captchas are getting harder

CAPTCHA stands for

  • Completely
  • Automated
  • Public
  • Turing test to tell
  • Computers and
  • Humans
  • Apart

Read more

3D printed Bitcoin desk watcher

Published on
#3d 

This is something I wanted to build for a long time: a Bitcoin price watcher and indicator as an elegant desk accessory.


Read more

20 common 3D printing mistakes and how to solve them

Published on
#3d 

You just got your 3D printer, and you already plugged it in.

Assembly: done 👍️

Filament: ready ✔️

STL file: affirmative ✳️

You put your SD card in and hit "Print" 🖨️


Read more