Skip to content

Instantly share code, notes, and snippets.

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

Jean Carlo Nascimento suissa

🏠
Working from home
  • Suissa Corp
  • Brasil
View GitHub Profile
@suissa
suissa / Calisthenics.md
Last active September 4, 2023 19:55 — forked from bobuss/Calisthenics.md
As 9 Regras do Object Calisthenics

Object Calisthenics descreve 9 regras básicas - pt-br

  1. Um nível de recuo por método.
  2. Não use a palavra-chave ELSE.
  3. Envolver todos os primitivos e Strings em classes. (em JS nao eh necessario)
  4. Funções de primeira classe // mudei p/ Function em vez de Class
  5. Um ponto por linha.
  6. Não abrevie.
  7. Mantenha todas os módulos com menos de 50 linhas.
  8. Nenhuma função com mais de dois parâmetros.
@suissa
suissa / uptime.erl
Created April 8, 2022 01:51 — forked from seriyps/uptime.erl
Uptime of Erlang node
-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).
@suissa
suissa / free-photoshop.md
Created May 13, 2019 20:11 — forked from molcik/free-photoshop.md
Modify Photoshop to never ending trial

How Does It Work

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

Setup Mac OS X

I'm in a hospital in Spain and my MacBook was stolen.

Hospital Commit

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.

1. Run Software Update

@suissa
suissa / portscan.js
Created August 6, 2012 14:46 — forked from kaiquewdev/portscan.js
A port scan with node.js ( by Hacksparrow <http://www.hacksparrow.com> )
#!/usr/bin/env node
var net = require('net'),
host = 'localhost',
start = 1,
end = 10000,
timeout = 15000;
while ( start <= end ) {
var port = start;
@suissa
suissa / cpf_consulta_api_sus.js
Last active June 21, 2020 19:57 — forked from Pompeu/cpf_consulta_api_sus.js
cpf_consulta_api_sus.js
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)
@suissa
suissa / README.md
Created September 26, 2016 20:42 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

Teste para projetos responsivos

Problema

Testar/verificar a disposição dos elementos de uma determinada página em determinadas resoluções de tela.

Solução

Executar captura de telas de acordo com os viewports definidos em um script, com a ajuda do PhantomJS.

Necessário ter o NodeJS instalado.

@suissa
suissa / git-clearHistory
Created May 6, 2019 22:44 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- 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