Skip to content

Instantly share code, notes, and snippets.

View JosielFaleiros's full-sized avatar
🏠
Working from home

Josiel Faleiros Alves JosielFaleiros

🏠
Working from home
  • Brazil
View GitHub Profile
@JosielFaleiros
JosielFaleiros / gist:18651da26f319cd5019fcefd647b28b7
Created March 2, 2020 14:13
macos in virtual box, it works!
How to install macOS High Sierra on VirtualBox on Windows 10
https://techsprobe.com/macos-high-sierra/
https://wikitake.com/download-macos-high-sierra-vmware-virtualbox-image-2/
https://wikitake.com/how-to-install-macos-high-sierra-on-virtualbox-on-windows/
cd "C:\Program Files\Oracle\VirtualBox\"
function getStackTrace () {
let stack
try {
throw new Error('')
} catch (error) {
stack = error.stack || ''
}
stack = stack.split('\n').map((line) => line.trim())
return stack.splice(stack[0] == 'Error' ? 2 : 1)
import axios from 'axios';
const instance = axios.create({
baseURL: 'https://baseurl',
headers: {
'Content-Type': 'application/json'
}
});
instance.interceptors.response.use((interceptedRequest) => {
const { performance } = require('perf_hooks');
const app = express();
const logRequestStart = (req, res, next) => {
var t0 = performance.now();
console.info(`\n\n\n${req.method} ${req.originalUrl}\n\n`);
res.on('finish', () => {
var t1 = performance.now();
// console.log("Call to doSomething took " + + " milliseconds.")
console.info(`\n\n\n\n [FINISH] ${req.method} ${req.originalUrl} ${res.statusCode} ${res.statusMessage}; ${res.get('Content-Length') || 0}b sent IN ${((t1 - t0) / 1000).toFixed(2)} SECONDS\n\n\n`)
josiel@josiel-pc:~$ react-native init AwesomeRNProject
This will walk you through creating a new React Native project in /home/josiel/AwesomeRNProject
Installing react-native...
Consider installing yarn to make this faster: https://yarnpkg.com
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN react-native@0.57.3 requires a peer of react@16.6.0-alpha.8af6728 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ react-native@0.57.3
#################################################
########### 01 - Explorando o RStudio ###########
#################################################
setwd("/media/josiel/PENDRIVE/Linguagem_r/DesenvolvimetoR.R
")
getwd()
# Informa??es sobre a sess?o
sessionInfo()
@JosielFaleiros
JosielFaleiros / randomCPF.php
Created October 15, 2018 01:49
Gerador de CPF aleatório
<?php
function mod($dividendo,$divisor)
{
return round($dividendo - (floor($dividendo/$divisor)*$divisor));
}
function cpf($compontos)
{
$n1 = rand(0,9);
@JosielFaleiros
JosielFaleiros / export_db_NODATA_with_name_datetime.sql
Last active September 18, 2018 21:30
export_db_NODATA_with_name_datetime.sql
mysqldump -u root -p -d DBNAME > ~/"DBNAME_nodata_$(date +"%Y_%m_%d_%I_%M_%p"
).sql"
@JosielFaleiros
JosielFaleiros / export_db_NODDL_with_name_datetime.sql
Last active September 20, 2018 18:00
export_db_NODDL_with_name_datetime.sql
mysqldump -u root -p --no-create-db --no-create-info DBNAME > ~/DBNAME_noddl_$(date +%Y_%m_%d_%I_%M_%p).sql
@JosielFaleiros
JosielFaleiros / export_db_with_name_datetime.sql
Created September 16, 2018 19:35
export_db_with_name_datetime.sql
mysqldump -u root -p dbname > ~/"dbname_$(date +"%Y_%m_%d_%I_%M_%p"
).sql"