942 private links
Neutralinojs is a lightweight and portable desktop application development framework. It lets you develop lightweight cross-platform desktop applications using JavaScript, HTML and CSS. You can extend Neutralinojs with any programming language (via extensions IPC) and use Neutralinojs as a part of any source file (via child processes IPC).
Paged.js is a free and open source JavaScript library that paginates content in the browser to create PDF output from any HTML content. This means you can design works for print (eg. books) using HTML and CSS!
Paged.js follows the Paged Media standards published by the W3C (ie the Paged Media Module, and the Generated Content for Paged Media Module). In effect Paged.js acts as a polyfill for the CSS modules to print content using features that are not yet natively supported by browsers.
- Discussions and help: Mattermost, Discourse
- Development: Gitlab
TimelineJS is an open-source tool that enables anyone to build visually rich, interactive timelines. Beginners can create a timeline using nothing more than a Google spreadsheet, like the one we used for the Timeline above. Experts can use their JSON skills to create custom installations, while keeping TimelineJS's core functionality.
The SHA-256 algorithm is a widely used hash function producing a 256-bit hash value. It is used in many security applications and protocols, including TLS and SSL, SSH, PGP, and Bitcoin.
Calculating a SHA-256 hash in JavaScript is easy using native APIs, but there are some differences between the browser and Node.js. As the browser implementation is asynchronous, both of the examples provided will return a Promise
for consistency.
Browser
In the browser, you can use the SubtleCrypto API to create a hash for the given value. You first need to create a new TextEncoder
and use it to encode the given value. Then, pass its value to SubtleCrypto.digest()
to generate a digest of the given data, resulting in a Promise
.
As the promise resolves to an ArrayBuffer
, you will need to read the data using DataView.prototype.getUint32()
. Then, you need to convert the data to its hexadecimal representation using Number.prototype.toString()
. Add the data to an array using Array.prototype.push()
. Finally, use Array.prototype.join()
to combine values in the array of hexes
into a string.
const hashValue = val =>
crypto.subtle
.digest('SHA-256', new TextEncoder('utf-8').encode(val))
.then(h => {
let hexes = [],
view = new DataView(h);
for (let i = 0; i < view.byteLength; i += 4)
hexes.push(('00000000' + view.getUint32(i).toString(16)).slice(-8));
return hexes.join('');
});
hashValue(
JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })
).then(console.log);
// '04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393'
Node.js
In Node.js, you can use the crypto
module to create a hash for the given value. You first need to create a Hash
object with the appropriate algorithm using crypto.createHash()
. Then, use hash.update()
to add the data from val
to the Hash
and hash.digest()
to calculate the digest of the data.
For consistency with the browser implementation and to prevent blocking on a long operation, we'll return a Promise
by wrapping it in setTimeout()
.
import { createHash } from 'crypto';
const hashValue = val =>
new Promise(resolve =>
setTimeout(
() => resolve(createHash('sha256').update(val).digest('hex')),
0
)
);
hashValue(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(
console.log
);
// '04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393'
Notes
- The two implementations are not compatible with each other. You cannot use the browser implementation in Node.js and vice versa.
- Both implementations should produce the same result for the same input.
In this article, you'll learn how to implement a user authentication system in JavaScript. By the end of the tutorial, you'll have a REST API, a database to store user information, authentication via JSON Web Tokens, and even verification emails!
Solve real-world HTML, CSS and JavaScript challenges whilst working to professional designs. Join 673 197 developers building projects, reviewing code, and helping each other get better.
Créer des animations simplement…
remoteStorage.js is a JavaScript library for storing user data locally in the browser, as well as connecting to remoteStorage servers and syncing data across devices and applications. It is also capable of connecting and syncing data with a person’s Dropbox or Google Drive account (optional).
rs.js stores data locally first and syncs data with a remote storage account second. This makes it a robust sync solution for mobile applications, where slow and spotty network connections are a normal situation.
Build iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript
Je présente à votre attention la traduction de l'article "Comment analyser l'URL en JavaScript: nom d'hôte, chemin, requête, hachage" de Dmitri Pavlutin.
Uniform Resource Locator ou URL pour faire court est un lien vers une ressource Web (page Web, image, fichier). L'URL définit l'emplacement de la ressource et la manière dont elle est reçue - le protocole (http, ftp, mailto).
An object in JavaScript is something similar to a real-life object. For example, an object can be your computer. It has various properties like color, screen size, and many methods (functionalities) like internet browsing. Computers can vary though, for example, they can have a different operating system, like macOS or Linux. Just like other data types, objects can contain various values. The values are written in a key-value pair saved inside curly braces. These key-value pairs are called properties of objects. Functions which are also properties are called methods.
From Medium.
Origin: https://medium.com//the-native-way-to-configure-path-aliases-in-frontend-projects-5db70f19a6e0
Projects often evolve into complex, nested directory structures. As a result, import paths may become longer and more confusing, which can negatively affect the code’s appearance and make it more difficult to understand where imported code originates from.
Using path aliases can solve the problem by allowing the definition of imports that are relative to pre-defined directories. This approach not only resolves issues with understanding import paths, but it also simplifies the process of code movement during refactoring.
Ce tutoriel est dédié à la présentation de fonctionnalités avancées de la bibliothèque Leaflet, il est dédié aux personnes connaissant déjà la bibliothèque. Pour ceux qui ne la connaissent pas et qui voudraient suivre ce tuto je vous conseille d’abord de suivre le tutoriel d’Eskimon .
Dans ce tuto nous allons apprendre à créer des interfaces utilisateur, à modifier les fonds de plans, à créer des marqueurs personnalisés et à ajouter des tooltips (texte) afin de créer des cartes interactives personnalisées.
Convert curl commands to Python, JavaScript, PHP, R, Go, C#, Ruby, Rust, Elixir, Java, MATLAB, Dart, CFML, Ansible URI or JSON
A polyglot web converter.
Convert code to another language.
#Shaarli💫 #dev #javascript #online #opensource #svg #tool #web #dev #tool
Iconify makes it easy to avoid vendor lock-in. You can use many open source icon sets with a large choice of open source icon components. Thousands of high quality icons from 100+ icon sets, all validated, cleaned up, optimised and always up to date.
Material Design, Phosphor, Remix, Carbon, Bootstrap, Tabler, Feather, Fluent, IconPark, Octicons and many other icon sets. Twitter Emoji, Fluent Emoji, EmojiOne, Noto Emoji are also available as icon sets.
#Shaarli💫 #css #dev #icon #javascript #opensource #tool #web
SRI is a new W3C specification that allows web developers to ensure that resources hosted on third-party servers have not been tampered with. Use of SRI is recommended as a best-practice, whenever libraries are loaded from a third-party source.
Learn more about how to use subresource integrity on MDN.
Find any alphanumeric snippet, signature or keyword in the web pages HTML, JS and CSS code.
Detecting the state of the caps lock key can improve the usability of web applications.
I'll introduce you to the top 100+ repositories on github on most important topics on programming ranging from Frontend to Backend, DSA, to Design Patterns and System Design. These repositories are beneficial for any level from beginner to expert level programmers. I recommend to bookmark it for future as they'll be quite useful in years to come in your career.