Discover gists
# Based on this answer: https://stackoverflow.com/a/61859561/1956278 | |
# Backup old data | |
Rename-Item -Path "./data" -NewName "./data_old" | |
# Create new data directory | |
Copy-Item -Path "./backup" -Destination "./data" -Recurse | |
Remove-Item "./data/test" -Recurse | |
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory | |
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse |
socket.emit('message', "this is a test"); //sending to sender-client only | |
socket.broadcast.emit('message', "this is a test"); //sending to all clients except sender | |
socket.broadcast.to('game').emit('message', 'nice game'); //sending to all clients in 'game' room(channel) except sender | |
socket.to('game').emit('message', 'enjoy the game'); //sending to sender client, only if they are in 'game' room(channel) | |
socket.broadcast.to(socketid).emit('message', 'for your eyes only'); //sending to individual socketid | |
io.emit('message', "this is a test"); //sending to all clients, include sender | |
io.in('game').emit('message', 'cool game'); //sending to all clients in 'game' room(channel), include sender | |
io.of('myNamespace').emit('message', 'gg'); //sending to all clients in namespace 'myNamespace', include sender | |
socket.emit(); //send to all connected clients | |
socket.broadcast.emit(); //send to all connected clients except the one that sent the message |
import tiktoken | |
import langdetect | |
T = tiktoken.get_encoding("o200k_base") | |
length_dict = {} | |
for i in range(T.n_vocab): | |
try: | |
length_dict[i] = len(T.decode([i])) | |
except: |
An guide how to activate Windows 11 Pro for free
Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet
The answer is yes! You can switch from almost any edition to Pro completely for free!
People which already have Pro, but not activated, can skip to this step.
What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:
So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.
-
Database in a browser, a spec (Stepan Parunashvili)
What problem are we trying to solve with a sync system?
-
The web of tomorrow (Nikita Prokopov)
# ***** BEGIN GPL LICENSE BLOCK ***** | |
# | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
Industry | ||
---|---|---|
Accounting | ||
Airlines/Aviation | ||
Alternative Dispute Resolution | ||
Alternative Medicine | ||
Animation | ||
Apparel/Fashion | ||
Architecture/Planning | ||
Arts/Crafts | ||
Automotive |
I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:
Set my args as follows:
const run = (async () => {
const args = [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-infobars',
export const db = [ | |
{ | |
id: 1, | |
name: 'Lukather', | |
image: 'guitarra_01', | |
description: 'Morbi ornare augue nisl, vel elementum dui mollis vel. Curabitur non ex id eros fermentum hendrerit.', | |
price: 299, | |
}, | |
{ | |
id: 2, |