- Um nível de recuo por método.
- Não use a palavra-chave ELSE.
- Envolver todos os primitivos e Strings em classes. (em JS nao eh necessario)
- Funções de primeira classe // mudei p/ Function em vez de Class
- Um ponto por linha.
- Não abrevie.
- Mantenha todas os módulos com menos de 50 linhas.
- Nenhuma função com mais de dois parâmetros.
-export([uptime/0, uptime/1, uptime_string/0]). | |
%% @doc uptime in native time units | |
uptime() -> | |
erlang:monotonic_time() - erlang:system_info(start_time). | |
%% @doc uptime in specified time units | |
uptime(Unit) -> | |
erlang:convert_time_unit(uptime(), native, Unit). |
All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:
cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT
Then you have to open the file and edit it. You can use just TextEdit app.
open -a TextEdit application.xml
// Discord all events! | |
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!) | |
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client | |
// Learn from this, do not just copy it mofo! | |
// | |
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584 | |
/* | |
koad-was-here |
I'm in a hospital in Spain and my MacBook was stolen.
Now I bought a new one and need to configure it. I have an external hard drive that backup everything using Time Machine, but I don't want all the crap I had in the old one.
#!/usr/bin/env node | |
var net = require('net'), | |
host = 'localhost', | |
start = 1, | |
end = 10000, | |
timeout = 15000; | |
while ( start <= end ) { | |
var port = start; |
const http = require('http') | |
const cpf = process.argv[2] | |
const url = 'http://dabsistemas.saude.gov.br/sistemas/sadab/js/buscar_cpf_dbpessoa.json.php?cpf=' | |
const consult = `${url}${cpf}` | |
let body = '' | |
http.get(consult, (res) => | |
res | |
.on('data', data => body += data) |
Testar/verificar a disposição dos elementos de uma determinada página em determinadas resoluções de tela.
Executar captura de telas de acordo com os viewports definidos em um script, com a ajuda do PhantomJS.
Necessário ter o NodeJS instalado.
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |