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
' This visual basic script is a very basic example | |
' how to retrieve measure values from a ProLeiT plant it system. | |
' | |
' It will create a csv style output for all measure | |
' datapoints with the latest timestamp of data and value. | |
' | |
' Before running this script you need to change the username, | |
' password, database server/instance and database to | |
' point at your system. | |
' |
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
/** | |
* CalculateUptimeSeconds() | |
* | |
* Handle millis() rollover and calculate the total uptime in seconds. | |
* This function must be called at least once for every 50 days to be | |
* able to see the rollover. | |
*/ | |
unsigned long CalculateUptimeSeconds(void) { | |
static unsigned int _rolloverCount = 0; // Number of 0xFFFFFFFF rollover we had in millis() |
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
/** | |
* PulseHeartbeat | |
* | |
* Blink the onboard LED to signal "Yepp, we are still runnning". | |
* The onbaord LED is on pin 13 and so pin 13 will be set to OUTPUT. | |
* | |
* Call this at the beginning of your loop() function. | |
* Caution: Will only work if millis() if functional and no one else | |
* did hook up timer0. | |
*/ |
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
/** | |
* GetOnboardTemperature | |
* | |
* Read temperature from the onbaord sensor. Check specs if sensor exist for your cpu. ;-) | |
* | |
* Example: | |
* char buff[10]; | |
* Serial.print("CPU temp.: " ); | |
* Serial.print(dtostrf(GetOnboardTemperature(), 5, 2, buff)); |
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
/** | |
* HumanReadableDuration | |
* | |
* Retruns a human readable duration for totalSeconds. | |
* Make sure outputBuffer is big enough to hold the | |
* complete string incl. temrinate '\0' character. | |
*/ | |
char* HumanReadableDuration(unsigned long totalSeconds, char* outputBuffer ) { | |
if(outputBuffer) { |
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
// We extend the string object with a little helper function | |
// to convert a boolean value from a string to bool. | |
// var flag = "true"._toBool | |
Object.defineProperty(String.prototype, "_toBool", { | |
get : function() { | |
return (/^(true|1)$/i).test(this); | |
} | |
}); |
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 MD5 = function(s) { | |
function L(k,d) { return(k<<d)|(k>>>(32-d))} | |
function K(G,k){var I,d,F,H,x;F=(G&2147483648);H=(k&2147483648);I=(G&1073741824);d=(k&1073741824);x=(G&1073741823)+(k&1073741823);if(I&d){return(x^2147483648^F^H)}if(I|d){if(x&1073741824){return(x^3221225472^F^H)}else{return(x^1073741824^F^H)}}else{return(x^F^H)}} | |
function r(d,F,k){return(d&F)|((~d)&k)} | |
function q(d,F,k){return(d&k)|(F&(~k))} | |
function p(d,F,k){return(d^F^k)} | |
function n(d,F,k){return(F^(d|(~k)))} | |
function u(G,F,aa,Z,k,H,I){G=K(G,K(K(r(F,aa,Z),k),I));return K(L(G,H),F)} | |
function f(G,F,aa,Z,k,H,I){G=K(G,K(K(q(F,aa,Z),k),I));return K(L(G,H),F)} |
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
use mysql; | |
update user set password=PASSWORD("UlE3x:rtRt$12") where User='vhost_4711'; | |
flush privileges; |
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
// go inside that folder: | |
cd /d "C:\$Windows.~BT" | |
// take over ownership | |
takeown /f *.* /R /D Y | |
// (go for coffee, takes a minute) | |
// grant full rights to everyone | |
icacls *.* /grant Everyone:(OI)(CI)F /T |
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 | |
GETUTCDATE() AS [DateTime], | |
[s_tst].[session_id], | |
[s_es].[login_name] AS [Login Name], | |
DB_NAME (s_tdt.database_id) AS [Database], | |
[s_tdt].[database_transaction_begin_time] AS [Begin Time], | |
[s_tdt].[database_transaction_log_bytes_used] AS [Log Bytes], | |
[s_tdt].[database_transaction_log_bytes_reserved] AS [Log Rsvd], | |
[s_est].text AS [Last T-SQL Text], | |
[s_eqp].[query_plan] AS [Last Plan] |
OlderNewer