Skip to content

Instantly share code, notes, and snippets.

View iamcopper's full-sized avatar

iamcopper iamcopper

View GitHub Profile
@aliva
aliva / move-cursor-linux.cpp
Created August 16, 2012 18:17
move mouse pointer to given position in linux
#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);
@zellio
zellio / fbterm-hacks.md
Last active November 30, 2023 06:45
fbterm, installation and configuration hacks

fbterm setup and config hacks

Installation and setup

Install fbterm via your favorite package manager

pacman -S fbterm
@srijan
srijan / rootaufs
Created September 23, 2014 09:18
rootaufs
#!/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
@Miouyouyou
Miouyouyou / Makefile
Last active December 24, 2023 10:14
Sample Makefile for cross-compiled ARM Linux kernel module
# 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
@alexandrnikitin
alexandrnikitin / Disable CPU power saving on CentOS 7.sh
Last active May 20, 2021 03:20
Disable CPU power saving on CentOS 7
# 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