Here goes your awesome project description!
Live demo here.
Here goes your awesome project description!
Live demo here.
Use TeamViewer without GUI, in pure console mode. That may be helpfull if you need to get easy access to a remote Linux server, that is located behind NAT.
$ cd ~/Downloads/
$ wget https://download.teamviewer.com/download/linux/teamviewer_i386.deb
$ sudo dpkg -i teamviewer_i386.deb
$ teamviewer help # list of commands, but not all of them, I don't know why
$ teamviewer info # check TV daemon status and get TV ID $ sudo teamviewer passwd [password] # set new password
# $ sudo addgroup i2c && sudo usermod -G i2c "$USER" | |
# $ sudo vim /lib/udev/rules.d/60-i2c-tools.rules | |
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660" | |
# Device restart required. | |
# Tested with Ubuntu 20.04 on Raspberry Pi. | |
# | |
# https://lexruee.ch/setting-i2c-permissions-for-non-root-users.html | |
# https://www.raspberrypi.org/forums/viewtopic.php?t=26212 |
# Editor configuration, see http://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
end_of_line = lf |
{ | |
"name": "simple-server", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"scripts": { | |
"start": "node node_modules/http-server/bin/http-server ./public/" | |
}, | |
"dependencies": { | |
"http-server": "^0.11.1" |
#!/bin/bash | |
# Usage: | |
# $ chmod +x lxc_create_container.sh | |
# $ ./lxc_create_container.sh <container-name> | |
# What this script is doing? | |
# * Creating new LXC container | |
# * Making it privileged (giving root permissions) | |
# * Creating new user (you can configure login and pass below) |
const app = require('express')() | |
const path = require('path') | |
const filePath = path.join(__dirname, 'raport.csv') | |
app.get('/', (req, res) => res.download(filePath)) | |
app.listen(3000, () => console.log(`Server listening on port 3000!`)) | |
// 1) Locate `node simpleDownloadServer.js` and `raport.csv` in the same directory | |
// 2) Execute in console `npm init && npm install express`, and then `node simpleDownloadServer.js` | |
// 3) Open in browser `http://localhost:3000/` in order to download `raport.csv` |
function formatBytes(bytes,decimals) { | |
if(bytes == 0) return '0 Bytes'; | |
var k = 1024, | |
dm = decimals || 2, | |
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], | |
i = Math.floor(Math.log(bytes) / Math.log(k)); | |
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; | |
} | |
// Usage: |