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
<% | |
On Error Resume Next | |
downloadPath = <<path>> | |
fileName = <<name>> | |
fileExt = <<extension>> | |
varTo = Server.MapPath(downloadPath) & "\" & fileName & fileExt | |
Set objStream = Server.CreateObject("ADODB.Stream") | |
objStream.Open |
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
-- Convert int to datetime with this script. | |
-- If anyone has a better or a more beautiful method, please, feel free to fork and change it. :) | |
declare @i as int | |
select @i = 20121029 --aaaammdd | |
select convert(datetime, convert(char(8), @i)) |
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
<% | |
' Command to set the region configurations to | |
' any country you want | |
' 1046: Brazil | |
' 1033: EUA | |
Session.LCID = 1046 | |
%> |
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 | |
require_once __DIR__.'/../vendor/autoload.php'; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
$app = new Silex\Application(); | |
// Twig | |
$app->register(new Silex\Provider\TwigServiceProvider(), array( |
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
<snippet> | |
<content><![CDATA[ | |
echo var_dump(${1:$SELECTION}); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>vdump</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.php</scope> | |
<!-- Optional: Description to show in the menu --> | |
<description>var_dump() any variable</description> |
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
Option Explicit | |
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Integer) As Integer | |
Private Sub Form_GotFocus() | |
Timer1.Enabled = False | |
End Sub | |
Private Sub Form_Resize() | |
If Me.WindowState = vbMinimized Then |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var clicks = 0; | |
var lastClick = [0, 0]; | |
var canvas = document.getElementById('exemploCanvas'); | |
canvas.addEventListener('click', draw, false); |
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
<!-- | |
From: CodeAcademy.com | |
Author: Eric Weinstein | |
Link: http://www.codecademy.com/pt/ericweinstein | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>To Do</title> | |
<link rel="stylesheet" type="text/css" href="style.css"/> |
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
var slaying = true; | |
// A bit of new math magic to calculate the odds | |
// of hitting the dragon. | |
var youHit = Math.floor(Math.random() * 2); | |
var dragonHit = Math.floor(Math.random() * 2); | |
var damageThisRound = Math.floor(Math.random() * 5 + 1); | |
var totalDamage = 0; | |
var life = 10; | |
var dragonLife = 10; |
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 | |
$file = 'fake.in.txt'; | |
if (!file_exists($file)) { | |
echo "O arquivo {$file} não existe."; | |
exit; | |
} | |
$handle = fopen($file, 'r'); | |