Skip to content

Instantly share code, notes, and snippets.

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

Deyvid Nascimento deyvin

🏠
Working from home
View GitHub Profile
@deyvin
deyvin / Vaga Product Designer
Created January 31, 2024 18:16
product_designer.md
Buscamos um profissional para atuar na área de Design de Produto.
Esse profissional será responsável pelo monitoramento de resultados e métricas das marcas,
garantindo que os KPIs estejam alinhados às expectativas dos clientes.
Sua atuação será cross-company, com foco em métricas e resultados utilizados para auxílio na tomada de decisão.
Responsabilidades e atribuições:
- Projetar conceitos, wireframes, fluxos, jornadas e interfaces para experiências web e mobile;
@deyvin
deyvin / inspectElement.js
Created February 29, 2012 13:19
Inspect Element With javaScript
function inspect(obj, maxLevels, level)
{
var str = '', type, msg;
// Start Input Validations
// Don't touch, we start iterating at level zero
if(level == null) level = 0;
// At least you want to show the first level
if(maxLevels == null) maxLevels = 1;
@deyvin
deyvin / get_remote_file_titanium_mobile.js
Created March 27, 2012 13:45
Get remote file with Titanium Mobile
function get_remote_file(filename, url, fn_end, fn_progress ) {
Ti.API.info("[filename]" + filename);
Ti.API.info("[url]" + url);
var file_obj = {file:filename, url:url, path: null};
var file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
if ( !file.exists() ) {
server {
root /var/www/promo;
index index.php index.html index.htm;
server_name example.com.br;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
@deyvin
deyvin / jquery.serialize_replace.js
Created March 2, 2012 14:13
Forçar serialize() do jQuery reconhecer checkboxes mesmo não marcado
$(function() {
$.fn.serialize = function (options) {
return $.param(this.serializeArray(options));
};
$.fn.serializeArray = function (options) {
var o = $.extend({
checkboxesAsBools: false
}, options || {});
<?php
$db = ibase_connect ('localhost:/usr/db/db.gdb', 'SYSDBA', 'masterkey');
$tr = ibase_trans( IBASE_DEFAULT, $tr ); #abre a transação do firebird
$insert = "INSERT INTO CLIENTES (ID, NOME) VALUES (1, 'JOSE')";
ibase_query($tr, $insert);
$insert = "INSERT INTO CLIENTES (ID, NOME) VALUES (1, 'JOSE')";
@deyvin
deyvin / acrescimo.php
Last active January 4, 2016 03:39
Como chegar a um valor de acréscimo aplicando um percentual de desconto para chegar ao valor fixo.
<?php
$valor_desejado = 500;
$percentual = 20;
echo ($valor_desejado * 100) / (100 − $percentual);
<?php
define('TOTALAPLICADO', 1000);
define('PERC_RENDIMENTO', 15);
define('DIAS', 31);
$total_por_dia = ((TOTALAPLICADO * PERC_RENDIMENTO) / 100) / DIAS;
@deyvin
deyvin / mysql_count_all_tables.php
Created October 17, 2013 21:02
Dynamic sql count - all mysql database tables
<?php
mysql_connect("localhost", "root", "1234");
$banco = 'ecommerce';
$db_selected = mysql_select_db($banco);
$result = mysql_query('SHOW TABLES');
while($row = mysql_fetch_assoc($result)) {
@deyvin
deyvin / ecommerce.rb
Last active December 20, 2015 02:29
Script para pesquisar preço dos ecommerce a partir do código interno do produto
require 'nokogiri'
require 'open-uri'
require 'mysql2'
class Ecommerce
attr_accessor :id, :name, :price, :bank_price, :con
@@con = Mysql2::Client.new(:host => 'localhost', :username => 'root', :password => '1234', :database => 'ecommerce')
def acessar_site(url)
Nokogiri::HTML(open(url, :proxy_http_basic_authentication => ['http://192.168.254.200:8080', 'deyvin', 'fdcsistemas123'] ))