Links
Most of commands accept number before (eg: 3k
moves down 3 times)
Links
Most of commands accept number before (eg: 3k
moves down 3 times)
package main | |
import ( | |
"fmt" | |
"unsafe" | |
) | |
func main() { | |
// way 1 | |
const is64Bit = uint64(^uintptr(0)) == ^uint64(0) |
class FpsCounter { | |
constructor(callbackFn) { | |
if (typeof callbackFn !== 'function') { | |
throw new ReferenceError(`Function argument required (got ${typeof callbackFn})`); | |
} | |
this.enabled = false; | |
this.fps = 0; | |
this.callback = callbackFn; | |
} | |
Linux exposes a special interface to control screen brightness via sysfs
in /sys/class/backlight
(source).
The problem is that in Lenovo Legion 5 there are two modules registered to control screen brightness - AMDGPU and ideapad modules:
$ ls /sys/class/backlight
amdgpu_bl0
ideapad
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
) | |
// ParseFloatPrecisely parses floating point from string as strconv.ParseFloat | |
// but avoids float point precision issue (ex: "0.21" parsed as 0.209999) | |
func ParseFloatPrecisely(str string, bitSize int) (num float64, err error) { | |
if str == "" || str == "0" { |
Most of commands accept number before (eg: 3k
moves down 3 times)
modes
package main | |
func IPsFromCIDR(cidr string) ([]net.IP, error) { | |
_, ipNet, err := net.ParseCIDR(cidr) | |
if err != nil { | |
return nil, err | |
} | |
ones, bits := ipNet.Mask.Size() | |
addrCount := 1 << (bits - ones) |
The root filesystem is rootfs
, which is stored in memory and therefore wiped on reboot. The Micro SD card is mounted at /tmp/fuse_d/
. Something is also mounted at /tmp/fuse_a
and /tmp/fuse_z
.
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
ServerName goplay2.x1unix.com | |
ServerAlias www.goplay2.x1unix.com |