Skip to content

Instantly share code, notes, and snippets.

View tadeubdev's full-sized avatar
🎯
Focusing

Tadeu Barbosa tadeubdev

🎯
Focusing
  • Espírito Santo, Brasil
View GitHub Profile
@tadeubdev
tadeubdev / Database.vb
Created February 27, 2017 00:39
Database para vb.net (VB)
Imports System.Data.OleDb
Imports System.Security.Cryptography
Imports System.Text
Public Class Database
Private DBCon As New OleDbConnection(My.Settings.DataBaseConnectionString)
Private DBCmd As New OleDbCommand
Private DBDA As New OleDbDataAdapter
Private DTTB As New DataTable
Public Param As New List(Of OleDbParameter)
@tadeubdev
tadeubdev / StringHelper.vb
Last active March 2, 2017 12:42
Prepare string, remove double spaces, special caracters
Imports System.Globalization
Imports System.Text
Imports System.Text.RegularExpressions
Public Class StringHelper
Shared normalizedString As String
Shared stringBuilder As New StringBuilder
Shared Response As String
Shared i As Integer
Shared c As Char
@tadeubdev
tadeubdev / Database-SQLite-File.vb
Last active March 3, 2017 02:31
How to connect to SQLite Database file in .vb
Imports System.Data.SQLite
Public Class Database
Private Cmd As SQLiteCommand
Private Conn As SQLiteConnection
Private Reader As SQLiteDataReader
Private ResponseData As Dictionary(Of String, String) = Nothing
Private ExMessage As String
Public Function Find(FileDB As String, SQLQuery As String) As Dictionary(Of String, String)
@tadeubdev
tadeubdev / a.html
Last active July 28, 2017 15:51
Apagando a luz da página por um iframe. Não esqueça de alterar o "http://site" pelo seu host.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>a</title>
<style>
.LuzApagada #overlay {
z-index: 8;
display: block;
width: 100%;
<?php
$FileSysObj = new COM('Scripting.FileSystemObject');
foreach ($FileSysObj->Drives as $Drive) {
$Drive = $FileSysObj->GetDrive($Drive);
if ($Drive->DriveType!=1) {
continue;
}
$Letter = $Drive->DriveLetter;
@tadeubdev
tadeubdev / pearson-correlation.js
Created December 20, 2017 13:58 — forked from matt-west/pearson-correlation.js
Pearson Correlation (JavaScript)
/**
* @fileoverview Pearson correlation score algorithm.
* @author matt.west@kojilabs.com (Matt West)
* @license Copyright 2013 Matt West.
* Licensed under MIT (http://opensource.org/licenses/MIT).
*/
/**
* Calculate the person correlation score between two items in a dataset.
@tadeubdev
tadeubdev / gist:cb49a576cee6c07c79a43812e36ab539
Last active June 27, 2020 12:54 — forked from johanmeiring/gist:3002458
"git lg" alias for pretty git log
# git log short
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
# git status short
git config --global alias.st "status -s"
@tadeubdev
tadeubdev / 0-how-to-use
Last active January 16, 2018 01:27
Starting with webdev on Ubuntu
1. The first file contains manual to create an enviroment of development.
2. After install all items go to second file to create your first virtualhost (using the second file in one of steps).
3. The third file has content to make an vhost in second step!
4. Return to second step everytime when you need a new vhost ;)
You're finished!
@tadeubdev
tadeubdev / RouteServiceProvider.php
Created January 17, 2018 14:17
Laravel 5 force root url
// Add it to file: app/Providers/RouteServiceProvider.php
/**
* @inheritdoc
*/
public function boot()
{
parent::boot();
/** @var \Illuminate\Routing\UrlGenerator $url */
@tadeubdev
tadeubdev / v-cloak.md
Created February 27, 2018 11:35 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->