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
function sleep(milliseconds) { | |
var start = new Date().getTime(); | |
for (var i = 0; i < 1e7; i++) { | |
if ((new Date().getTime() - start) > milliseconds){ | |
break; | |
} | |
} | |
} | |
var results = Promise.all([1,2,3].map(async (x) => { sleep(5000); await console.log(x); })); |
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
#include <DHT.h> | |
#include <ESP8266WiFi.h> | |
String apiKey = "thingspeak api key"; | |
const char* ssid = "ssid name"; | |
const char* password = "ssid password"; | |
const char* server = "api.thingspeak.com"; | |
#define DHTPIN D2 | |
#define DHTTYPE DHT11 |
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
<div id="widget-song">...</div> | |
<script type="text/javascript"> | |
var datoActual = ""; | |
(function consultarTrack(){ | |
var request = new XMLHttpRequest(); | |
request.open('GET', 'http://softcloudradio.com/trackdata.php', true); | |
request.onload = function() { | |
if (request.status >= 200 && request.status < 400) { | |
// Success! | |
var data = request.responseText; |
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
CREATE FUNCTION FormatearMonto(@NumStr varchar(50)) | |
RETURNS Varchar(50) | |
AS | |
BEGIN | |
declare @OutStr varchar(50) | |
declare @i int | |
declare @run int | |
Select @i=CHARINDEX('.',@NumStr) | |
if @i=0 |
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
#Create file with instructions and save as script.ps1 | |
Write-Host "Hello, World!" | |
# Open cmder or CMD as Administrator (right button click > Open as administrator) | |
λ powershell | |
Windows PowerShell | |
Copyright (C) 2009 Microsoft Corporation. Reservados todos los derechos. | |
PS> Set-ExecutionPolicy RemoteSigned | |
#Close program |
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
//lbcolor: color en bd (definido en paleta de vb6 designer) | |
int lbcolor = 255; | |
int pBlue = 0; | |
int pRed = 0; | |
int pGreen = 0; | |
if (lbcolor < 256) { | |
pRed = lbcolor; | |
pBlue = 0; |