Skip to content

Instantly share code, notes, and snippets.

View pcboy's full-sized avatar
🍕
🥖 🌱

David Hagege pcboy

🍕
🥖 🌱
View GitHub Profile
@pcboy
pcboy / README.md
Created November 3, 2022 04:48 — forked from hrishikeshrt/README.md
cgroups - Limit memory usage of firefox

Limit Memory Usage using cgroups

Example: firefox

Limiting memory per process with cgroups

cgroups (abbreviated from control groups) is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. You can use it to make sure specific processes and their children cannot allocate more than a given amount of RAM.

On Ubuntu you must install the following package:

@pcboy
pcboy / i8kmon.conf
Last active May 3, 2021 10:23 — forked from dptsolutions/i8kmon.conf
i8kmon.conf file for Dell XPS 13 9350
# Sample i8kmon configuration file (/etc/i8kutils/i8kmon.conf, ~/.i8kmon).
set config(auto) 1
# External program to control the fans
set config(i8kfan) /usr/bin/i8kfan
# Report status on stdout, override with --verbose option
set config(verbose) 0
# Status check timeout (seconds), override with --timeout option
@pcboy
pcboy / README.md
Created April 25, 2021 12:34 — forked from timosaur/README.md
Linux Mint Setup for XPS 13
@pcboy
pcboy / gist:47a5dd2f69ec0e5db66465c91fa5e7c8
Last active September 6, 2016 07:51
monero compilation

First compile openssl with: ./build-target-openssl.sh /Users/admin/Downloads/crystax-ndk-10.3.2/build/instruments/openssl-OpenSSL_1_0_1t Don't forget to fix build-target-openssl.sh (set OPENSSL_VERSION to 1.0.1t)

To get a toolchain:

$NDK/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=/tmp/my-android-toolchain
cp -rf $NDK/boost/1.61.0/include/boost/ /tmp/my-toolchain/sysroot/usr/include/
@pcboy
pcboy / fizz.c
Last active July 14, 2016 07:28
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
struct tartine_s {
int nb;
char *text;
};

Keybase proof

I hereby claim:

  • I am pcboy on github.
  • I am pcboy (https://keybase.io/pcboy) on keybase.
  • I have a public key ASDfzl6mkSF-_CaaXlctmbOLOOJIYQeJ0EIoV189M0WQ_Qo

To claim this, I am signing this object:

#!/usr/bin/env ruby
# -*- encoding : utf-8 -*-
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar
# 14 rue de Plaisance, 75014 Paris, France
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long