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">
"""This is the demo to describe how to migrate SQLite3 database in just single file migration script. | |
Should be useful for minimal Python environments to run these scripts robust. | |
""" | |
import sqlite3 | |
conn = sqlite3.connect("myapp.db") | |
# Migraiton class. It is okay to use tuple, but it is readable to declare such class. |
mod db; | |
mod entities; | |
mod graphql; | |
use crate::db::create_db_pool; | |
use crate::graphql::schema::{create_schema, AppSchema}; | |
use actix_cors::Cors; | |
use actix_web::{get, middleware::Logger, post, web::Data, App, HttpServer, Responder}; | |
use async_graphql_actix_web::{GraphQLRequest, GraphQLResponse}; | |
use dotenv::dotenv; |
function main() { | |
const res = | |
'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんー' | |
.split('') | |
.sort(() => Math.random() - 0.5) | |
console.log(...res) | |
setTimeout(main, 50) | |
} | |
main() |
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/tfjs@1.2"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/body-pix@2.0"></script> | |
<style> | |
.relative { | |
position: relative; | |
} | |
.renderer { | |
width: 400px; |