This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = array ( | |
'http://youtu.be/dQw4w9WgXcA', | |
'http://www.youtube.com/embed/dQw4w9WgXcB', | |
'http://www.youtube.com/watch?v=dQw4w9WgXcC', | |
'http://www.youtube.com/?v=dQw4w9WgXcD', | |
'http://www.youtube.com/v/dQw4w9WgXcE', | |
'http://www.youtube.com/e/dQw4w9WgXcF', | |
'http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcG', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Torna os elementos de um array unico, incrementando os que forem iguais | |
*/ | |
Array.prototype.oneOfAKind = function() { | |
for(var i = 1; i < this.length; i++) { | |
if(this[i-1] >= this[i]) { | |
this[i] = this[i] + 1; | |
return this.oneOfAKind(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$show_date = DateTime::createFromFormat('d/m/Y', $dateInput)->format('Y-m-d'); | |
// Fonte: | |
// http://stackoverflow.com/questions/15676344/format-date-dd-mm-yyyy-to-yyyy-mm-dd-php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select cast(definition as varchar(4000)) | |
from sys.objects o | |
join sys.sql_modules m on m.object_id = o.object_id | |
where o.object_id = object_id( 'dbo.V_NF_ENT_FORN_NOTA') | |
and o.type = 'V' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Converter data no Excel do formato MM/DD/AAA para DD/MM/AAAA | |
=DATA(DIREITA(F42;4);ESQUERDA(F42;2);EXT.TEXTO(F42;4;2)) | |
https://social.technet.microsoft.com/Forums/en-US/f7525b14-2039-41b5-8aa9-6ac63fbb8233/change-date-format-in-ms-excel-2013-form-mmddyyyy-to-ddmmyyyy?forum=excel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Para verificar o IP externo de um endereço | |
-- No prompt de comando do windows | |
nslookup codac00-as077.fiesc.com.br 8.8.8.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Spider Websites with Wget – 20 Practical Examples | |
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
1. Download a single file from the Internet | |
wget http://example.com/file.iso | |
2. Download a file but save it locally under a different name | |
wget ‐‐output-document=filename.html example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* These simple triggers are available in Sheets, Docs, and Forms | |
* Most of this information can be found: | |
* https://developers.google.com/apps-script/guides/triggers/events | |
*/ | |
function onOpen(e) { | |
// { | |
// authMode: 'LIMITED', | |
// source: 'Spreadsheet' || 'Document' || 'Form', | |
// user: 'User' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Test Layout</title> | |
<style type="text/css"> | |
body, html | |
{ | |
margin: 0; padding: 0; height: 100%; overflow: hidden; | |
} |
OlderNewer