- Copy the file
valetproxy.php
inside your computer - rename as valetproxy
- chmod u+x valetproxy
- mv valetproxy /usr/local/bin/ (like composer installation process)
- edit your ~/.zshrc, ~/.bash_profile
- add these following lines
const { JSDOM } = require('jsdom') | |
const { compact, expand, frame } = require('jsonld') | |
const url = 'https://www.bbc.co.uk/schedules/p00fzl6p/2020/06/14' | |
// fetch and parse HTML | |
const { window: { document } } = await JSDOM.fromURL(url) | |
// select the script elements containing JSON-LD | |
const elements = document.querySelectorAll('script[type="application/ld+json"]') |
valetproxy.php
inside your computer
export type Obj = Record<any, any>; | |
export const isArray = Array.isArray; | |
export const isObject = (val: unknown): val is Obj => { | |
return val !== null && typeof val === 'object'; | |
}; | |
export type StrapiAttributesObject = { | |
attributes: any; |
Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.
These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.
Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following
{ | |
"editor.tabSize": 2, | |
"editor.renderWhitespace": "all", | |
"files.associations": { | |
// "*.twig": "html", | |
// "*.html": "twig", | |
"*.module": "php" | |
}, | |
"workbench.colorTheme": "Dracula", | |
"scss.validate": false, |
const int coinSelector = A1; // Analog input pin that the coin selector uses | |
int signalValue = 0; // For storing value from analog input | |
int signalPreviousValue = 0; | |
int offsetTrigger = 80; | |
int pulseCounter = 0; | |
bool hasTriggered = false; |
In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.
After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.
But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.
And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?
In dark rooms, in hushed tones, we speak of colours.
tr td:nth-child(2) a{ | |
font-size: 0; | |
} | |
tr td:nth-child(2) a::after{ | |
content: attr(href); | |
font-size: 16px; | |
} |
license: mit |