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 logger | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"runtime" | |
"time" |
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> | |
<meta charset="UTF-8"> | |
<title>Server-sent events demo</title> | |
</head> | |
<body> | |
<button>Close the connection</button> | |
<ul> | |
</ul> |
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 ( | |
"flag" | |
"fmt" | |
"os" | |
"time" | |
"github.com/stianeikeland/go-rpio" | |
) |
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 <Servo.h> // Standard servo library | |
Servo myservo; | |
#define SERVO_PIN 9 // Set to the controller pin for the servo | |
int servo_pos = 0; | |
int val1; // Floating value 1 | |
int val2; // Floating value 2 | |
int val3; // Floating value 3 |
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 ( | |
"log" | |
"os/exec" | |
"time" | |
) | |
func main() { | |
// Start a process: |
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/json" | |
"errors" | |
"log" | |
"net/http" | |
"time" | |
) |
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 ( | |
"log" | |
qrcode "github.com/skip2/go-qrcode" | |
) | |
func main() { | |
err := qrcode.WriteFile("https://www.danesparza.net", qrcode.Medium, 128, "qr.png") |
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 50 * FROM(SELECT COALESCE(OBJECT_NAME(s2.objectid),'Ad-Hoc') AS ProcName, | |
execution_count,s2.objectid, | |
(SELECT TOP 1 SUBSTRING(s2.TEXT,statement_start_offset / 2+1 , | |
( (CASE WHEN statement_end_offset = -1 | |
THEN (LEN(CONVERT(NVARCHAR(MAX),s2.TEXT)) * 2) | |
ELSE statement_end_offset END)- statement_start_offset) / 2+1)) AS sql_statement, | |
last_execution_time | |
FROM sys.dm_exec_query_stats AS s1 | |
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS s2 ) x | |
WHERE sql_statement NOT like 'SELECT TOP 50 * FROM(SELECT %' |
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" | |
"log" | |
"os" | |
"time" | |
"github.com/danesparza/ical" | |
"github.com/teambition/rrule-go" |
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 ( | |
"log" | |
"os/exec" | |
) | |
func main() { | |
// First, query the OS to get a list of Wifi AP SSIDs |
NewerOlder