This file contains hidden or 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
{ | |
"basics": { | |
"name": "Thomas Edison", | |
"label": "Inventor and Businessman", | |
"picture": "https://example.com/photo.jpg", | |
"email": "[email protected]", | |
"phone": "(123) 456-7890", | |
"website": "https://thomasedison.com", | |
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
"location": { |
This file contains hidden or 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
{ | |
"basics": { | |
"name": "Thomas Edison", | |
"label": "Inventor and Businessman", | |
"picture": "https://example.com/photo.jpg", | |
"email": "[email protected]", | |
"phone": "(123) 456-7890", | |
"website": "https://thomasedison.com", | |
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
"location": { |
This file contains hidden or 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
{ | |
"basics": { | |
"name": "Thomas Edison", | |
"label": "Inventor and Businessman", | |
"picture": "https://example.com/photo.jpg", | |
"email": "[email protected]", | |
"phone": "(123) 456-7890", | |
"website": "https://thomasedison.com", | |
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.", | |
"location": { |
This file contains hidden or 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 {WorkerHost} from '@nestjs/bullmq'; | |
import {Job} from 'bullmq'; | |
export class BatchWorkerHost extends WorkerHost { | |
private jobBatchCreationTime: Date; | |
private jobBatch: Job[]; | |
private jobBatchProcessPromise: Promise<void>; | |
private running: boolean = false; | |
private resolveJobBatchProcessPromise: () => void; |
This file contains hidden or 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
#!/bin/bash | |
# This script takes a clean Ubuntu Server 24.04 LTS AMI and installs and configures | |
# everything needed to deploy a Rails 7 app to it. The resulting state is a secure, | |
# production-ready instance. | |
set -euo pipefail | |
# --- AESTHETICS --- |
This file contains hidden or 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
#!/bin/bash | |
# I edited the ruby lexer (line 637 in the following file... | |
# [skm@skmair2:/Library/Python/2.7/site-packages/pygments/lexers/agile.py | |
# to remove spacial handling of the word 'name' | |
# so I could use it as a variable/method name. | |
# This script come from Katrina, with these instructions: | |
# I've also attached the presentation.py file which is where the style | |
# is defined. The colors are normal hex values, so if you know how you |
This file contains hidden or 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
// abstract class, not intended to be instantiated directly | |
class CalendarItem { | |
static #UNSET = Symbol("unset") | |
static #isUnset(v) { | |
return v === this.#UNSET; | |
} | |
static { | |
for (let [idx,msg] of [ | |
"ID is already set.", | |
"ID is unset.", |
This file contains hidden or 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
/* Scale a value from one range to another | |
* Example of use: | |
* | |
* // Convert 33 from a 0-100 range to a 0-65535 range | |
* var n = scaleValue(33, [0,100], [0,65535]); | |
* | |
* // Ranges don't have to be positive | |
* var n = scaleValue(0, [-50,+50], [0,65535]); | |
* | |
* Ranges are defined as arrays of two values, inclusive |
This file contains hidden or 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
// main.js | |
import {cat} from './animals.js' | |
cat(); | |
// animals.js | |
function cat() { | |
console.log('meow'); | |
} |
NewerOlder