Skip to content

Instantly share code, notes, and snippets.

View onlurking's full-sized avatar
:shipit:
ship it

Diogo Felix onlurking

:shipit:
ship it
View GitHub Profile
@onlurking
onlurking / fix.js
Last active January 11, 2024 19:04
const isValidSongContent = (req, res, next) => {
const rules = [
{
name: "songTitle",
validation: (value) => value.trim().length > 0,
error: "Title content must be at least one character long.",
},
{
name: "songArtist",
validation: (value) => value.trim().length > 0,
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-blockid {
visibility: hidden;
}
.cm-blockid::first-letter
{
visibility: visible;
font-weight: 800;
}
@onlurking
onlurking / mindmap
Created August 26, 2021 22:05
Obsidian Mindmap Templater - Excalidraw
<%*
const IDX = Object.freeze({"depth":0, "text":1, "parent":2, "size":3, "children": 4, "objectId":5});
//check if an editor is the active view
const editor = this.app.workspace.activeLeaf?.view?.editor;
if(!editor) return;
//initialize the tree with the title of the document as the first element
let tree = [[0,this.app.workspace.activeLeaf?.view?.getDisplayText(),-1,0,[],0]];
const linecount = editor.lineCount();
@onlurking
onlurking / dell-vostro-5490-sound-fix.md
Last active March 18, 2023 02:07
Dell Vostro 5490 Sound and Microphone Fix (Manjaro/Arch Linux)

Vostro 5490 Sound and Microphone Fix (Manjaro/Arch Linux)

Instal sof-firmware as described in Arch Linux Wiki:

sudo pacman -S sof-firmware

Configure PulseAudio to load Alsa modules with the correct device and channel settings, by adding these two lines to /etc/pulse/default.pa:

const colors = [
{
color: 'red',
value: '#f00',
},
{
color: 'green',
value: '#0f0',
},
{
@onlurking
onlurking / Design Systems 101 Syllabus.md
Created September 8, 2020 18:06
Design Systems 101 Syllabus

Design Systems 101 Syllabus

A 10-week course about design systems from SuperFriendly

Week 1: Introduction to Design Systems

Discussion

  • Introductions
@onlurking
onlurking / Design Systems 101 Materials & Supplies.md
Created September 8, 2020 18:06
Design Systems 101 Materials & Supplies

Design Systems 101 Materials & Supplies

Design Systems 101 Materials & Supplies

The intention for this course’s materials is to be as cost-free and opt-in as possible. You’ll need the ability to design user interfaces and write code, but your choice of hardware and software is up to you.

Required Textbooks

Expressive Design Systems By Yesenia Perez-Cruz

%title: Command Line Productivity %author: @onlurking %date: 2020-07-24

-> # Terminal <-

a.k.a. terminal emulator.

It's a program that opens a window and lets you interact with the shell. There are a bunch of

@onlurking
onlurking / five-orders-of-ignorance.md
Created July 23, 2020 22:03
The Five Orders of Ignorance - Phillip G. Armour

The Five Orders of Ignorance

By Phillip G. Armour
Communications of the ACM, October 2000, Vol. 43 No. 10, Pages 17-20
10.1145/352183.352194

In my first column (Aug. 2000, p. 19), I argued that software is not a product, but rather a medium for the storage of knowledge. In fact, it is the fifth such medium that has existed since the beginning of time. The other knowledge storage media being, in historical order: DNA, brains, hardware, and books. The reason software has become the storage medium of choice is that knowledge in software has been made active. It has escaped the confinement and volatility of knowledge in brains; it avoids the passivity of knowledge in books; it has the flexibility and speed of change missing from knowledge in DNA or hardware.

If software is not a product, then what is the product of our efforts to produce software? It is the knowledge contained in the software. It's rather easy to produce software. It's much more difficult to produce software that works, because we ha