Now, you can scrape website with simple pipe.
$ curl -Ss 'https://moncargo.io' | scrape.rb meta
<meta name="viewport" content="width=device-width">
<meta charset="utf-8">
<meta name="twitter:title" content="MonCargo - Track your cargo online">
Now, you can scrape website with simple pipe.
$ curl -Ss 'https://moncargo.io' | scrape.rb meta
<meta name="viewport" content="width=device-width">
<meta charset="utf-8">
<meta name="twitter:title" content="MonCargo - Track your cargo online">
#!/usr/bin/env node | |
import { createServer } from 'http' | |
import { exec } from 'child_process' | |
import { networkInterfaces } from 'os' | |
const log = (t) => | |
console.log(`[${new Date().toLocaleTimeString()}] ` + JSON.stringify(t)) | |
createServer((req, res) => { |
I've created a systemd unit to restore brightness of my laptop (system76 Lemur Pro 10).
It has been worked for almost a year, but suddenly it stopped working. I've fixed by value (sleep 5
).
I took the log and found this line, I would like to stop this, but don't know how to do it.
Oct 18 23:17:35 archlinux kernel: video LNXVIDEO:00: Restoring backlight state
export const MyComponent() { | |
const { toggleVideoBlur, isVideoBlur } = useBlurLocalTrack({}) | |
const _toggleVideoBlur = async () => { | |
twilioRoom.localParticipant.videoTracks.forEach((track) => track.unpublish()) | |
const videoTrack = await toggleVideoBlur() | |
await wait(1000) | |
participant.publishTrack(videoTrack) | |
} |
import { useState } from 'react' | |
export const Draggable: React.FC<{}> = ({ children }) => { | |
const [position, setPosition] = useState({ x: 0, y: 0 }) | |
return ( | |
<div | |
className="cursor-move" | |
draggable | |
style={{ transform: `translate(${position.x}px, ${position.y}px)` }} |
diff --git a/src/components/Room/Room.tsx b/src/components/Room/Room.tsx | |
index 443c1f120..7cb7c3f5e 100644 | |
--- a/src/components/Room/Room.tsx | |
+++ b/src/components/Room/Room.tsx | |
@@ -1,7 +1,15 @@ | |
-import React from 'react'; | |
+import React, { useRef, useEffect } from 'react'; | |
import ParticipantList from '../ParticipantList/ParticipantList'; | |
import { styled } from '@material-ui/core/styles'; | |
import MainParticipant from '../MainParticipant/MainParticipant'; |
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/[email protected]"></script> | |
<style> | |
.relative { | |
position: relative; | |
} | |
.renderer { | |
width: 400px; |
import { memo, useState, useMemo } from 'react' | |
const MODE = 'memo' | |
function MiddleRaw({ children }) { | |
console.log('middle') | |
return <div>{children}</div> | |
} | |
const Middle = memo(MiddleRaw) |
import { | |
Exchange, | |
cacheExchange, | |
createClient, | |
dedupExchange, | |
fetchExchange, | |
subscriptionExchange, | |
} from 'urql' | |
import { delay, empty, fromPromise, map, mergeMap, pipe, tap } from 'wonka' | |
import firebase from 'firebase' // NOTE: This is old Firebase version |
const { inputting } = useInputting() | |
<div style={{ height: inputting ? '50vh' : '100vh' }}> | |
... |