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 { payloads } = require('./payloads.json') | |
const { Worker } = require('worker_threads') | |
const LEADING_ZEROES = 4 | |
const final = [] | |
let finishedWorkers = 0 | |
for (let payload of payloads) { | |
const worker = new Worker('./worker.js', { env: { LEADING_ZEROES } }) | |
worker.once('message', (message) => { |
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
var express = require('express'); | |
var path = require('path'); | |
var cookieParser = require('cookie-parser'); | |
var logger = require('morgan'); | |
var app = express(); | |
app.use(logger('dev')); | |
app.use(express.json()); | |
app.use(express.urlencoded({ extended: false })); |
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
import 'package:flutter/material.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
//https://stackoverflow.com/a/53107519/10409567 | |
void main() async { | |
// load the shared preferences from disk before the app is started | |
WidgetsFlutterBinding.ensureInitialized(); | |
final prefs = await SharedPreferences.getInstance(); | |
// create new theme controller, which will get the currently selected from shared preferences |
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
import 'dart:collection'; | |
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
void main() { | |
runApp( | |
ChangeNotifierProvider( | |
create: (context) => ShoppingCartProvider(), | |
child: const MyApp(), |
Download flutter
tar xvf flutter_linux_1.17.5-stable.tar.xz
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
#!/bin/sh | |
# script para instalar programas que ajudam no desempenho. | |
echo "Esta de acordo em fazer o upgrade? (digite: ok e tecle enter se sim) " | |
read certeza | |
if [ "$certeza" = "ok" ] | |
then | |
sudo apt-get install zram-config -y | |
sudo apt-get install preload -y | |
sudo apt-get install prelink -y |
OlderNewer