Skip to content

Instantly share code, notes, and snippets.

We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 68 columns, instead of 45. in line 1.
BrandName,BrandOriginCountry,BrandOriginRegion,BrandSector,BrandSubSector,Rank2001,Rank2002,Rank2003,Rank2004,Rank2005,Rank2006,Rank2007,Rank2008,Rank2009,Rank2010,Rank2011,Rank2012,Rank2013,Rank2014,Rank2015,Rank2016,Rank2017,Rank2018,Rank2019,Rank2020,Rank2021,Equity2001,Equity2002,Equity2003,Equity2004,Equity2005,Equity2006,Equity2007,Equity2008,Equity2009,Equity2010,Equity2011,Equity2012,Equity2013,Equity2014,Equity2015,Equity2016,Equity2017,Equity2018,Equity2019,Equity2020,Equity2021,GrowthRate2001,GrowthRate2002,GrowthRate2003,GrowthRate2004,GrowthRate2005,GrowthRate2006,GrowthRate2007,GrowthRate2008,GrowthRate2009,GrowthRate2010,GrowthRate2011,GrowthRate2012,GrowthRate2013,GrowthRate2014,GrowthRate2015,GrowthRate2016,GrowthRate2017,GrowthRate2018,GrowthRate2019,GrowthRate2020,GrowthRate2021
Louis Vuitton,France,Europe,Fashion,Luxury,38,41,45,44,18,17,17,16,16,16,18,17,17,19,20,19,19,18,17,17,13,7053,7054,6708,6602,16077,17606,20321,21602,21120,21860,23172,23577,24893,22552,22250,23998,22919,28152,32223
#!/bin/bash
fg="\e[38;5;"
bg="\e[48;5;"
reset="\e[0m"
grey="0m"
red="1m"
green="2m"
yellow="3m"
blue="4m"
@jerrythomas
jerrythomas / extensions.json
Created July 28, 2022 11:03
vscode-extensions
{
"recommendations": [
"svelte.svelte-vscode",
"ardenivanov.svelte-intellisense",
"antfu.browse-lite",
"antfu.iconify",
"antfu.slidev",
"antfu.unocss",
"antfu.vite",
"antfu.where-am-i",
@jerrythomas
jerrythomas / merge-lcov.sh
Last active October 30, 2023 16:01
merge lcov.info from packages under a monorepo into a single one.
#!/bin/bash
files=`find ./ -name lcov.info`
args=""
for f in $files; do
prefix=`echo $f | sed -e s/coverage.lcov.info// | sed -e s#^\./##`
echo "fixing paths in $f"
sed -i.bak "s#^SF\:src#SF\:${prefix}src#g" $f
args="$args -a $f"
done
---
core:
- brew
- zsh
- prezto
fonts:
- victor-mono
theme: one-dark
@jerrythomas
jerrythomas / encrypted-dmg.sh
Created August 4, 2021 16:19
Create and attach encrypted dmg
echo test1234 | hdiutil create -stdinpass -size 16m -encryption AES-128 encryptedimage.dmg
echo test1234 | hdiutil create -stdinpass -srcfolder testfiles -encryption AES-128 encryptedimage.dmg
echo -n test1234 | hdiutil attach -stdinpass encryptedimage.dmg
"""
Given a matrix of size MxN find all groups of adjacent elements and print their size.
Empty spaces are marked with 0 and filled with 1. Adjacency is only horizontal or vertical.
"""
def scan(row, col, layout, items, used_pairs):
pair = (row, col)
if pair not in used_pairs and layout[row][col]:
items.append(pair)
volumes:
s3data:
driver: local
services:
s3vol:
image: elementar/s3-volume
command: /data s3://{BUCKET NAME}
environment:
- BACKUP_INTERVAL={INTERVALL IN MINUTES (2m)}
- AWS_ACCESS_KEY_ID={KEY}
@jerrythomas
jerrythomas / Icons.js
Created October 17, 2018 04:45
Generate App Icons
const sharp = require('sharp');
const fs = require('fs-extra');
function generateIcons(sourceFile){
let sizes = [512, 384, 256, 192, 152, 144, 128, 96, 72, 32];
fs.ensureDirSync('assets/icons');
sizes.forEach(size => {
let iconFile = `assets/icons/icon-${size}x${size}.png`;
if (size == 32)