Category: Web Design – Javascript

Static Site Boilerplate – A better workflow for building modern static websites

Static Site Boilerplate – A better workflow for building modern static websites A better workflow for building modern static websites. Automated build processes, a local development server, production minification and optimizations, and the latest standards for static websites. BASH $ git clone https://github.com/ericalli/static-site-boilerplate&& cd static-site-boilerplate && rm -rf .git && git init $ npm install $ npm run start $ npm run build:dist 🎉 Local…

The days of lost private keys are over. Never again will you have to go to your favorite spot on...

Part A : Setting Up Key Recovery Step 1 : Email Authentication Within your Coinsafe app, you can click on the “Recovery” icon to initiate the key recovery process. You would first need to provide your email address and confirm the OTP received on your email address. This way we will really know it’s you who’s trying to recover your mnemonic if you ever lose it. Step 2 :…

TypeScript Express tutorial #5. MongoDB relationships between documents

December 31, 2018 Today we dive into MongoDB relationships between documents. To do it we use Mongoose and the populate feature. As always, the code that we cover here is available in the express-typescript repository. You’re welcome to give it a star. MongoDB relationships between documents The fact is that MongoDB is a NoSQL database. It means that it is non-relational, among other things. To implement…

Advanced In Browser Routing

What if your client side JavaScript could route based on a regular expression or functional matching of requested URLs? What if it could waterfall like Express on the server? This article covers the techniques used to build such a router if you would like one for React or Vue. First, here is an example of an advanced route configuration. You will obviously have to tweak…

Async-Ray 3.1.0: Chaining Methods in an Easy Way

geeganage 14 hours ago. Async-Ray 3.1.0 introduces a new feature to chain Async methods, without looking weird. Chaining documentation https://github.com/rpgeeganage/async-ray#chaining Sample 1 https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_1.ts Sample 2 https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_2.ts

Understanding Call, Bind and Apply Methods

illustration from undraw.co If you are learning JavaScript, you might have seen the this keyword. The this keyword in JavaScript behaves differently compared to other programming languages. This causes a lot of confusion for programmers. In other object-oriented programming languages, the this keyword always refers to the current instance of the class. Whereas in JavaScript, the value of this depends on how a function is…

Nested Destructuring

Destructuring in JavaScript can initially feel confusing but the truth is that destructuring can make your code a bit more logical and straight forward. Destructuring does look a bit more complex when you’re looking for a property several objects deep, so let’s have a look at how to do that! Simple destructuring looks as follows: const { target } = event; Here we use {}…

Quantum signals with Several Bits per Photon sent – FrontNet

For the first time researchers have been able to transmit Quantum signals with several bits per photon through the air. The special feature of the experiment: The researchers have sent the manipulated photon over a distance of 300 meters above the roofs of the city of Ottawa. Ottawa (Canada). Presumably, quantum communication will be the future. Also in the field of quantum cryptography is currently…

Force Download with JavaScript

Force download scripts have been an important part of internet usability for a long time.  I can attest to that by the number of times I’ve implemented this feature on the server side and the popularity of my PHP Force Download post, even to this day.  With the web world having moved much more the client side, I started looking for a method to force…

layout-architect: A Library for Building Layouts

A small utility for building custom layouts. Written in vanilla JavaScript. Works with finite number of layout blocks. No dependencies. Check out the demo here. Installation JavaScript: npm install layout-architect or yarn add layout-architect or you can grab a .js file directly here https://unpkg.com/layout-architect@latest/la.min.js CSS The CSS that the module uses: .la{position:relative;width:100%;height:100%}.la-block{box-sizing:border-box;height:100%;max-width:100%;max-height:100%;overflow:hidden;text-align:center;position:relative}.la-block a.la-remove{position:absolute;bottom:1em;left:calc(50% – 10px);display:none;border:solid 1px #999;text-decoration:none;color:#000;border-radius:6px;width:20px;text-align:center}.la-block a.la-remove:hover{border:solid 1px #000}.la-block:hover a.la-remove{display:block}.la-block a.la-left,.la-block a.la-right,.la-block a.la-top,.la-block a.la-bottom{opacity:.3;position:absolute;border:solid…