This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const si = require('systeminformation'); | |
(async () => { | |
console.log('cpu speed', await si.cpuCurrentspeed()) | |
console.log('cpu temperatrue', await si.cpuTemperature()) | |
console.log('memory', await si.mem()) | |
console.log('disk', await si.fsSize()) | |
})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# derived | |
/build | |
/dist | |
/test/output | |
/coverage | |
/output | |
# npm, yarn | |
/node_modules | |
/npm-debug.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [{ | |
"type": "node", | |
"request": "launch", | |
"name": "Test", | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js", | |
"env": { | |
"NODE_ENV": "test" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locale-gen en_US.UTF-8 && dpkg-reconfigure locales | |
adduser simone | |
apt upgrade && apt upgrade | |
dpkg-reconfigure tzdata | |
apt install sudo | |
usermod -aG sudo simone | |
apt-get install software-properties-common | |
reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const csv = require('csv-parser') | |
const fs = require('fs') | |
function esc (str) { | |
return str.replace(/'/g, "''") | |
} | |
function main () { | |
const rows = [] | |
fs.createReadStream('file.csv') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"list": [ | |
"spotify", | |
"meer info", | |
"consegna gratuita", | |
"scopri di pi", | |
"advertisement", | |
"ascolta adesso", | |
"power it", | |
"hits unlimited", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://ubuntu-mate.community/t/thunderbird-with-huge-icons-emoticons-mate-18-04/16249/22 | |
cd /tmp | |
wget https://raw.githubusercontent.com/mozilla/positron/master/browser/fonts/EmojiOneMozilla.ttf | |
sudo mkdir /usr/lib/thunderbird/fonts | |
sudo mv /tmp/EmojiOneMozilla.ttf /usr/lib/thunderbird/fonts/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs-extra') | |
function csv (result, file) { | |
const _content = [] | |
let _header = false | |
for (const row of result) { | |
const _line = [] | |
for (const field in row) { | |
if (!_header) { | |
_line.push('"' + field + '"') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* @todo write default settings file if not exists | |
* @todo mute only spotify channel | |
*/ | |
const cprocess = require('child_process') | |
const fs = require('fs') | |
const path = require('path') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# base64 image encode | |
echo "data:image/jpeg;base64,$(base64 -w 0 image.jpg)" |