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 the official emscripten image | |
FROM emscripten/emsdk:latest | |
# Install necessary packages | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
build-essential \ | |
cmake \ | |
python3 \ | |
&& rm -rf /var/lib/apt/lists/* |
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 an Ubuntu base image | |
FROM ubuntu:latest | |
# Install necessary dependencies | |
RUN apt-get update && apt-get install -y \ | |
nginx \ | |
curl \ | |
&& apt-get clean | |
# Install nvm (Node Version Manager) |
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
package main | |
import ( | |
"crypto/tls" | |
"encoding/base64" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) |
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
package main | |
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/json" | |
"io" | |
"log" | |
"net/http" | |
"strings" |
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 | |
TOP 10 | |
qs.last_execution_time, | |
SUBSTRING(st.text, (qs.statement_start_offset/2) + 1, | |
((CASE qs.statement_end_offset | |
WHEN -1 THEN DATALENGTH(st.text) | |
ELSE qs.statement_end_offset | |
END - qs.statement_start_offset)/2) + 1) AS query_text | |
FROM sys.dm_exec_query_stats qs | |
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st |
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 | |
TOP 10 | |
qs.total_elapsed_time / qs.execution_count AS average_execution_time, | |
qs.execution_count, | |
qs.total_logical_reads / qs.execution_count AS average_logical_reads, | |
qs.total_physical_reads / qs.execution_count AS average_physical_reads, | |
SUBSTRING(qt.text, (qs.statement_start_offset/2) + 1, | |
((CASE qs.statement_end_offset | |
WHEN -1 THEN DATALENGTH(qt.text) | |
ELSE qs.statement_end_offset |
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
import ( | |
"database/sql" | |
_ "github.com/microsoft/go-mssqldb" | |
_ "github.com/microsoft/go-mssqldb/integratedauth/krb5" | |
) | |
func main() { | |
// Replace with actual values | |
connectionString := "authenticator=krb5;server=your_server_name;database=your_database_name;user id=your_username;krb5-realm=comani.com;krb5-configfile=/etc/krb5.conf;" |
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 Generate-CodeVerifier { | |
$bytes = New-Object Byte[] 32 | |
[System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($bytes) | |
return [System.Convert]::ToBase64String($bytes) -replace '\+', '-' -replace '\/', '_' -replace '=' | |
} | |
function Generate-CodeChallenge($verifier) { | |
$bytes = [System.Text.Encoding]::ASCII.GetBytes($verifier) | |
$hash = [System.Security.Cryptography.SHA256]::Create().ComputeHash($bytes) | |
return [System.Convert]::ToBase64String($hash) -replace '\+', '-' -replace '\/', '_' -replace '=' |
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
package main | |
import ( | |
"crypto/x509" | |
"fmt" | |
"net/http" | |
"io/ioutil" | |
"encoding/base64" |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"github.com/skratchdot/open-golang/open" | |
) |
NewerOlder