Skip to content

Instantly share code, notes, and snippets.

View msoap's full-sized avatar
🇺🇦

Serhii Mudryk msoap

🇺🇦
View GitHub Profile
@msoap
msoap / safari-get-all-tabs-urls.sh
Last active May 19, 2020 07:45
get Safari all tabs urls and titles
#!/bin/sh
osascript<<APPLESCRIPT 2>&1
-- get Safari all tabs urls and titles
-- safari-get-all-tabs-urls.sh | less
tell application "Safari"
set tabsList to front window's tabs as list
repeat with currTab in tabsList
set currName to currTab's name
set currURL to currTab's URL
@msoap
msoap / generics_handlers.go
Created July 22, 2021 14:59
Handling handlers with different types via Go generics (using go 1.18+)
package main
import (
"encoding/json"
"fmt"
)
func main() {
app := NewApp()
server := NewServer()
package main
import "fmt"
func main() { fmt.Println(q + "\x60" + q + "\x60") }
var q = `package main
import "fmt"