Skip to content

Instantly share code, notes, and snippets.

View jefersondaniel's full-sized avatar

Jeferson Daniel jefersondaniel

View GitHub Profile
@reisraff
reisraff / p.py
Last active June 12, 2019 18:39
Simple pwntool::process
#!/usr/bin/env python
import subprocess
import select
import fcntl
import os
import pty
import tty
import sys
import time
import spacy
import random
TRAIN_DATA = [('what is the price of polo?', {'entities': [(21, 25, 'PrdName')]}),
('what is the price of ball?', {'entities': [(21, 25, 'PrdName')]}),
('what is the price of jegging?', {'entities': [(21, 28, 'PrdName')]}),
('what is the price of t-shirt?', {'entities': [(21, 28, 'PrdName')]}),
('what is the price of jeans?', {'entities': [(21, 26, 'PrdName')]}),
('what is the price of bat?', {'entities': [(21, 24, 'PrdName')]}),
  • Por que fazer testes?
    • saber se o software está funcionando de maneira automatizada
      • não elimina os testes exploratórios feito de forma manual
    • manter custos de desenvolvimento em níveis saudáveis
    • ajuda na qualidade interna do código (design e arquitetura do código)
  • Como avaliar a qualidade dos testes (se estão bem feitos)?
    • corretude - se o teste não está gerando um falso positivo
  • adequação do tipo de teste - se o teste é o mais adequado para a situação
@rochacbruno
rochacbruno / rochacbruno_open_source.md
Last active August 10, 2019 13:38
Contribute to Open Source Projects
@jimmywarting
jimmywarting / readme.md
Last active April 19, 2025 05:22
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active August 18, 2024 02:58
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@thevangelist
thevangelist / my-component.spec.js
Created August 4, 2016 13:06
The only React.js component test you'll ever need (Enzyme + Chai)
import React from 'react';
import { shallow } from 'enzyme';
import MyComponent from '../src/my-component';
const wrapper = shallow(<MyComponent/>);
describe('(Component) MyComponent', () => {
it('renders without exploding', () => {
expect(wrapper).to.have.length(1);
});
@magnetikonline
magnetikonline / README.md
Last active July 5, 2023 09:18
Compile ssh2 bindings extension for PHP7.

Compile ssh2 bindings extension for PHP7

The current PHP ssh2 extension via PECL won't compile under PHP7.

Using a more recent version via PHP's GitHub we can make this work.

$ sudo apt-get install autoconf libssh2-1-dev
$ curl -LO https://github.com/php/pecl-networking-ssh2/archive/master.zip
$ unzip master.zip
$ cd pecl-networking-ssh2-master
@apocas
apocas / nodev4centos6.sh
Last active March 6, 2017 16:40
Compiling Nodejs v4 in Centos 6
#!/bin/bash
#Nodejs v4.x needs gcc v4.8, Centos 6 comes with gcc v.4.4.
#devtools-2 comes already bundled with v4.8
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install -y devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
scl enable devtoolset-2 bash
wget https://nodejs.org/dist/latest/node-v4.0.0-linux-x64.tar.gz
tar -zxvf node-v4.0.0-linux-x64.tar.gz