-
-
Create a raw image file of 1G size
dd if=/dev/zero of=ubuntu_base.img bs=1G count=1
-
This file contains hidden or 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
# disable power saving on CentOS 7 | |
grep -E '^model name|^cpu MHz' /proc/cpuinfo | |
pgrep -lf ondemand | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | |
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do [ -f $CPUFREQ ] || continue; echo -n performance > $CPUFREQ; done | |
service cpuspeed stop | |
lsmod | grep ondemand | |
grep -E '^model name|^cpu MHz' /proc/cpuinfo |
This file contains hidden or 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
# Set this variable with the path to your kernel. | |
# Don't use /usr/src/linux if you're cross-compiling... | |
MYY_KERNEL_DIR ?= ../linux | |
# If you're compiling for ARM64, this will be arm64 | |
ARCH ?= arm | |
# This is the prefix attached to your cross-compiling gcc/ld/... tools | |
# In my case, gcc is armv7a-hardfloat-linux-gnueabi-gcc | |
# If you've installed cross-compiling tools and don't know your |
This file contains hidden or 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
#!/bin/sh | |
# Copyright 2008 Nicholas A. Schembri State College PA USA | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or 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
#include <X11/Xlib.h> | |
#include <iostream> | |
#include <unistd.h> | |
int main(void) { | |
Display* dpy = XOpenDisplay(0); | |
int scr = XDefaultScreen(dpy); | |
Window root_window = XRootWindow(dpy, scr); | |
int height = DisplayHeight(dpy, scr); |