Remeber to use git config core.ignorecase false
while you are on case insensitive partition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const storage = { | |
async get(key) { | |
return new Promise((resolve, reject) => { | |
chrome.storage.local.get(key, (result) => { | |
if (chrome.runtime.lastError) { | |
return reject(chrome.runtime.lastError) | |
} | |
resolve(result[key]) | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Not sure whether it's genius or stupid, but it definitely works. | |
// The goal is to reduce chaining critical requests. | |
// By default in most cases Astro do this: html -> small chunk -> big chunk(s), which is kinda like Require.js, where you need to download file, to know what file you want to download. | |
// Code below takes this small chunk and inlines it into html, so we have at least one client-side request to make less: html -> big chunk(s). | |
// Additionally we can add "modulepreload" to start fetching those files faster (not sure where in this particular case it makes any sense, but was easy to add, so I did it). | |
// For sure this code isn't optimal, I just quickly hacked it just to have PoC, but I belive it won't hurt server-side performance that much. | |
// If you know some better way to do it, that doesn't require digging through HTML and replacing strings, please let me know. | |
import fs from "node:fs" | |
import path from "node:path" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TTLCache from "@isaacs/ttlcache" | |
import axios from "axios" | |
const domainsCache = new TTLCache({ | |
ttl: 1000 * 60 * 60 * 24, // cache for 24h | |
}) | |
const lists = [ | |
"https://raw.githubusercontent.com/wesbos/burner-email-providers/master/emails.txt", // submiting my findings here | |
"https://raw.githubusercontent.com/Igloczek/burner-email-providers/master/emails.txt", // adding my fork, as sometime PRs are stuck unmerged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to use this script? | |
// 1. Set LinkedIn language to engligh (I just didn't test it on others) | |
// 2. Go to https://www.linkedin.com/mynetwork/invite-connect/connections/ | |
// 3. Paste this script to the console and watch :) | |
[...document.querySelectorAll('.mn-connection-card')] | |
// Comment out line below, if you want to remove not only people joined your network in the last year | |
.filter(el => el.querySelector('.time-badge').innerText.search(/year/igm) === -1) | |
.filter(el => el.querySelector('.mn-connection-card__occupation').innerText.search(/recruit|rekru|hr|talent|headhunter|people|resource|hiring|build|job|researcher/gmi) !== -1) | |
.forEach((el, index) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from 'node:path' | |
import fs from 'node:fs/promises' | |
import { globby } from 'globby' | |
const files = await globby('./dist/**/index.html') | |
await Promise.all( | |
files.map(async htmlPath => { | |
const pageStyles = [] | |
const stylesPaths = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs-extra') | |
const path = require('path') | |
const glob = require('glob') | |
const prettier = require('prettier') | |
const components = glob | |
.sync('src/*/*/*.js', { ignore: '**/*.{stories,stories_,spec}.js' }) | |
.map(file => ({ | |
src: file, | |
name: path.basename(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Enable js minification with Uglify. Uncomment this out during development tomake builds faster | |
optimize: 'none', | |
inlineText: true, | |
baseUrl: '/Users/igloczek/Sites/magento2-bundling/pub/static/frontend/Magento/luma/source', | |
dir: '/Users/igloczek/Sites/magento2-bundling/pub/static/frontend/Magento/luma/en_US', | |
// Shim configuration for non-AMD modules. Copied from requirejs-config | |
shim: { | |
'jquery/jquery-migrate': ['jquery'], | |
'jquery/jquery.hashchange': ['jquery', 'jquery/jquery-migrate'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const glob = require('glob') | |
const fs = require('fs') | |
glob('core/components/**/*.js', (temp, files) => { | |
files.forEach(path => { | |
// const file = require('./' + path) | |
console.log(path) | |
let file = fs.readFileSync('./' + path, 'utf8') | |
file = file.replace(/import Vue from 'vue'\n/gm, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.domReady = function(callback) { | |
var ready = false; | |
var detach = function() { | |
if(document.addEventListener) { | |
document.removeEventListener("DOMContentLoaded", completed); | |
window.removeEventListener("load", completed); | |
} | |
else { | |
document.detachEvent("onreadystatechange", completed); |
NewerOlder