I hereby claim:
- I am reinaldorauch on github.
- I am reinaldorauch (https://keybase.io/reinaldorauch) on keybase.
- I have a public key ASCmW9d6MpR7JuaQpwyYqB8M40uo7TNjD9UWB9_r9iAi1Ao
To claim this, I am signing this object:
class Klass { | |
private _privProperty = 10; | |
printHelloTenTimes() { | |
for (let i = 0; i < this._privProperty; i++) { | |
console.log('Hello'); | |
} | |
} | |
} |
function converteABNT(nomeCompleto) { | |
const [sobrenome, ...restoNome] = nomeCompleto.split(' ').reverse(); | |
const [primeiroNome, ...restoNome2] = restoNome.reverse(); | |
return [sobrenome.toUpperCase(), [primeiroNome, ...restoNome2.map(n => n[0] + '.')].join(' ')].join(', '); | |
} | |
// converteABNT('Reinaldo Antonio Camargo Rauch') === 'RAUCH, Reinaldo A. C.' |
# ssh-agent | |
if [ -f ~/.ssh/agent.env ] ; then | |
. ~/.ssh/agent.env > /dev/null | |
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then | |
echo "Stale agent file found. Spawning new agent… " | |
eval `ssh-agent | tee ~/.ssh/agent.env` | |
ssh-add | |
fi | |
else | |
echo "Starting ssh-agent" |
reinaldo@reinaldo-VirtualBox:~/android/lineage$ repo sync -l --fetch-submodules -q | |
Checking out projects: 5% (30/583) LineageOS/android_device_motorola_msm8916-commonerror: Cannot checkout LineageOS/android_external_aac: GitError: LineageOS/android_external_aac rev-list ('^14c0a419d4cbeb93261f6efb1b84c8efa7cb0129', 'HEAD', '--'): fatal: not a git repository (or any of the parent directories): .git | |
Traceback (most recent call last): | |
File "/home/reinaldo/android/lineage/.repo/repo/main.py", line 530, in <module> | |
_Main(sys.argv[1:]) | |
File "/home/reinaldo/android/lineage/.repo/repo/main.py", line 505, in _Main | |
result = run() | |
File "/home/reinaldo/android/lineage/.repo/repo/main.py", line 498, in <lambda> | |
run = lambda: repo._Run(name, gopts, argv) or 0 |
I hereby claim:
To claim this, I am signing this object:
function timeout(ms) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(), ms); | |
}); | |
} | |
// Aí vc adiciona na corrente de promises na função de insersão do banco: | |
function bulkInsert(conn, data) { | |
const sql = 'INSERT INTO table (fielda, fieldb, fieldc) VALUES ?'; | |
return mysqlQuery(sql, data.map(mapObjectIntoArray)) |
const Promise = require('bluebird'); // usado para rodar o map em sequência para não sobrecarregar o db | |
/** | |
* Converte a chamada da conexão para realizar query para usar promise | |
*/ | |
function mysqlQuery(conn, sql, params) { | |
return new Promise((resolve, reject) => { | |
conn.query(sql, params, (err, result) => { | |
if (err) return reject(err); | |
resolve(result); |
Mat invertImage(Mat image) { | |
Vec3b p; | |
for (int i = 0; i < image.rows; ++i) | |
{ | |
for (int j = 0; j < image.cols; ++j) | |
{ | |
p = image.at<Vec3b>(i, j); | |
image.at<Vec3b>(i, j)[0] = 255 - p[0]; | |
image.at<Vec3b>(i, j)[1] = 255 - p[1]; |
<table style="border: 1px solid #000; border-collapse: collapse; padding: 10px;"> | |
<thead> | |
<tr> | |
<th style="border: 1px solid #000;" colspan="2">Legenda</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td style="border: 1px solid #000;"><span style="background-color: red; display: block; height: 50px; width: 50px;"></span></td> | |
<td style="border: 1px solid #000;">Terminal Central - Bairro</td> |
export const login = async ({ commit }, creds) => { | |
try { | |
const user = await firebase.auth().signInWithEmailAndPassword(creds.email, creds.password) | |
commit(types.AUTH_SET_USER, user.uid); | |
return { | |
"success": true, | |
"data": user | |
} | |
} catch (error) { | |
return { |