apt-get install gcc-arm-linux-gnueabihf qemumkdir qemu-arm-sandbox && cd qemu-arm-sandbox| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "github.com/gocolly/colly" | |
| ) | |
| type MyCollector struct { |
| """ | |
| Single Responsibility Principle | |
| “…You had one job” — Loki to Skurge in Thor: Ragnarok | |
| A class should have only one job. | |
| If a class has more than one responsibility, it becomes coupled. | |
| A change to one responsibility results to modification of the other responsibility. | |
| """ | |
| class Animal: | |
| def __init__(self, name: str): |
cd
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
tar -zxvf go1.6.2.linux-amd64.tar.gz
sudo mv go /usr/local/
export GOROOT=/usr/local/go
mkdir -p ~/gitwork/go/src
mkdir ~/gitwork/go/bin| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "net" | |
| "net/http" | |
| "os" |
Libvirt stores pflash/nvram files for privliged users in /var/lib/libvirt/qemu/nvram/ this is a copy of the template var file that is read only. OVMF uses these files to store information such as boot information. The template inforamtion was uesed to be configured in /etc/libvirt/qemu.conf but was moved to json files. [https://bugs.archlinux.org/task/64175]
Location of master nvram file This configuration option is obsolete. Libvirt will follow the QEMU firmware metadata specification to automatically locate firmware images. See docs/interop/firmware.json in the QEMU source tree. These metadata files are distributed alongside any
/var/lib/lxc/mycontainer/config$HOME/.local/share/lxc/mycontainer/configlxc.mount directive, that follows the format below. Substitute proper paths as necessary:
lxc.mount.entry = /path/to/folder/on/host /path/to/mount/point none bind 0 0| /** | |
| * Using a single integer to represent multiple permissions | |
| * based on binary values using bitwise operators | |
| * | |
| * & bitwise AND - if both the top and bottom bit are 1, result is 1 | |
| * | bitwise OR - if either the top and bottom bit or both are 1, result is 1 | |
| * ^ bitwise XOR - if only one of the bits are 1, result is 1 | |
| * 0101 | |
| * 0100 & = 0100 | |
| * |
| package main | |
| import ( | |
| "encoding/base64" | |
| "net/http" | |
| "strings" | |
| ) | |
| type handler func(w http.ResponseWriter, r *http.Request) |
| from collections import defaultdict | |
| from django.db.models.signals import * | |
| class DisableSignals(object): | |
| def __init__(self, disabled_signals=None): | |
| self.stashed_signals = defaultdict(list) | |
| self.disabled_signals = disabled_signals or [ | |
| pre_init, post_init, | |
| pre_save, post_save, |