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" | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" | |
) |
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 |
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" | |
. "github.com/ory/ladon" | |
manager "github.com/ory/ladon/manager/memory" | |
) | |
func main() { |
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 ( | |
"database/sql" | |
"fmt" | |
"log" | |
_ "github.com/cznic/ql/driver" | |
"github.com/jmoiron/sqlx" | |
) |
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" | |
"github.com/danesparza/tplink" | |
) | |
func main() { |