Skip to content

Instantly share code, notes, and snippets.

View julienreszka's full-sized avatar

Julien Henri Reszka julienreszka

View GitHub Profile

Project Goals and Objectives template

This is a template to define the duration, goals, objectives and termination criteria of a project.

Duration

Date Before Date After Number of weeks
2024-02-29 2024-06-29 6
javascript:(function() { const regex = /\b(\w{1,3}|\w{4,})/g; const paragraphs = document.getElementsByTagName('p'); for (let i = 0; i < paragraphs.length; i++) { const paragraph = paragraphs[i]; paragraph.innerHTML = paragraph.innerHTML.replace(regex, match => `<b>${match.substr(0,3)}</b>${match.substr(3)}`); }})();
@julienreszka
julienreszka / find-all-files-in-src-except-ignored-and-print-their-line-count-sorted-by-count.sh
Last active March 20, 2023 10:02
Bash script to Find all files (except for ignored extensions) and print their line count, sorted by count
#!/bin/bash
# Find all files (except for ignored extensions) and print their line count, sorted by count
IGNORED_EXTENSIONS=(svg json) # list of extensions to ignore
LINE_THRESHOLD=300
find ./src -type f | while read FILE; do
# Check if the file extension is in the list of ignored extensions
extension="${FILE##*.}"
@julienreszka
julienreszka / three-random-four-digits-separated-by-dashes-string.js
Created February 21, 2022 16:34
Useful for creating Google-like Payments profile ID
var getRandom4 = () => String(Math.round(Math.random(1000,9999) * 100000)).slice(0,4)
var get3Random4SeparatedByDashes = () => [getRandom4(),getRandom4(),getRandom4()].join('-')
get3Random4SeparatedByDashes()
// '1610-6631-6374' // for example
function wordFreq(string) {
var words = string.replace(/[.]/g, '').split(/\s/);
var freqMap = {};
words.forEach(function(w) {
var lowerWord = w.toLowerCase()
if (!freqMap[lowerWord]) {
freqMap[lowerWord] = 0;
}
freqMap[lowerWord] += 1;
});
var items = [];document.querySelectorAll('.content-area-content>ul>li').forEach(e=>{
items.push({country:e.children[0].textContent, list:e.children[1].textContent})
}); copy(items);
@julienreszka
julienreszka / index.html
Created April 23, 2021 03:10
ortable: `put: []` demo // source https://jsbin.com/suviyigovi
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ortable: `put: []` demo</title>
<!-- AngularJS -->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>

How The New Boston digital currency works

Transcript from the video

https://www.youtube.com/watch?v=Dgj_OStjD1Q

The goal of this project is to build the most reliable, secure and fastest digital currency in the world.

It is a peer-to-peer network and it's made up of 3 different types of nodes, three different types of servers.

@julienreszka
julienreszka / business-calendar.md
Created October 18, 2020 09:18
Template for business calendar in quarters and weeks per quarter with months of weeks

Business Calendar

2020

2020-Q1

  • W01-Dec-Jan
  • W02-Jan-Jan
  • W03-Jan-Jan
  • W04-Jan-Jan
@julienreszka
julienreszka / disable-pageview-api.js
Created August 25, 2020 22:33 — forked from gwarser/disable-pageview-api.js
"Disable Page Visibility API" scriptlet for uBO
/// disable-pageview-api.js
// Based on: https://addons.mozilla.org/firefox/addon/disable-page-visibility/
// License: http://www.opensource.org/licenses/bsd-license.php
(function(){
// visibilitychange events are captured and stopped
document.addEventListener("visibilitychange", function(e) {
e.stopImmediatePropagation();
}, true);
// document.visibilityState always returns false
Object.defineProperty(Document.prototype, "hidden", {