YAPC::EU 2018 Glasgow Update!

This commit is contained in:
Ingy döt Net 2018-08-17 15:15:24 +01:00
parent 22f33d4004
commit 4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions

View file

@ -0,0 +1,31 @@
package main
import (
"fmt"
"log"
"os/exec"
"time"
)
func main() {
// query supported display modes
out, err := exec.Command("xrandr", "-q").Output()
if err != nil {
log.Fatal(err)
}
fmt.Println(string(out))
time.Sleep(3 * time.Second)
// change display mode to 1024x768 say (no text output)
err = exec.Command("xrandr", "-s", "1024x768").Run()
if err != nil {
log.Fatal(err)
}
time.Sleep(3 * time.Second)
// change it back again to 1366x768 (or whatever is optimal for your system)
err = exec.Command("xrandr", "-s", "1366x768").Run()
if err != nil {
log.Fatal(err)
}
}

View file

@ -0,0 +1,10 @@
if platform()=LINUX then
{} = system_exec("xrandr -s 640x480")
sleep(3)
{} = system_exec("xrandr -s 1280x960")
else -- WINDOWS
puts(1,"") -- (ensure console exists)
system("mode CON: COLS=40 LINES=25")
sleep(3)
system("mode CON: COLS=80 LINES=25")
end if